3 ms·
I agree it could be more clean, but the way it is designed allows for immediately understandable semantics when dealing with inherited types (which everyone tho
by sqeaky 9y ago
I agree it could be more clean, but the way it is designed allows for immediately understandable semantics when dealing with inherited types (which everyone though was the future during Java's Formative years).
This makes operations like this intuitive:
Animal results = new Dog("Lassie");
- mcphage 9y agoIt does, but they should have found a solution which allowed that, as well as not be redundant in the more common case where the two classes are the same. Hence Java's type system being verbose and clumsy.