On Nov 3, 2021, at 10:23 AM, Kevin Bourrillion <kev...@google.com<mailto:kev...@google.com>> wrote:
I think this fits neatly with the current design: `Point` has no supertypes*, not even `Object`, but `Point.ref` does. (*I mean "supertype" in the polymorphic sense, not the "has a conversion" sense or the "can inherit" sense. I don't know what the word is really supposed to mean. :-)) Slippery terms. “Type” is hopelessly broad as is “super type”. For types as value sets, a super type is a value super set. Again, int <: long in this view, and even in the JLS. For types as in an object hierarchy, a super type is a parent+ type, an upper limit in the hierarchy lattice. That view centers on object polymorphism and virtual methods, and is suspiciously bound up with pointer polymorphism. So String <: Object in this view. To heal the rift we are groping towards int <: Object, but we don’t fully know which kind of “<:” that is, and how it breaks down into a value set super, an object hierarchy super, or perhaps something further. The best view we have so far, IMO, is that int <: Object breaks apart into int <: int.ref (value set) and int.ref <: Object (hierarchy). In that view, the last link of int <: int.ref requires a story of how methods “inherit” across value sets, without the benefit of a pointer-polymorphic hierarchy to inherit within. It’s doable, but we are running into the sub-problems of this task.