I have been looking at OpenJDK Java source code for java.util.List and java.util.Collection interfaces, and it seems that even though the first interface extends the second one, most of the method signatures in Collection are repeated in List. Does anyone know why they might do it that way? It is redundant to do so, true?
Both of those interfaces contain method signatures for equals and hashCode that are required for every Java Object or sub-class (which is all Java objects), which also seems redundant.
Perhaps it is done to provide more specific doc strings for those methods in those interfaces?
π―! I never quite understood the point of the standards. By publishing a standard, and by enabling people to make their own non-standard extensions, the language authors instantly forego a lot of freedom in evolving the language without trampling on these extensions. Also, LISPs already give users a lot more expressive power to mould the language to their needs making standards even less useful IMHO.
Almost certainly, I suspect, I canβt think of another reason to do so.