4 ms·
I think the stronger similarities came much later when generics were introduced. Both languages were then on a path of horrific type-nazism at that point. Stron
by jayvanguard 11y ago
I think the stronger similarities came much later when generics were introduced. Both languages were then on a path of horrific type-nazism at that point. Strong static typing + a weak type system = rubbish. Sprinkle in design pattern-itis you have the mess both languages are currently in.
Before then java wasn't so bad.
- ajuc 11y agoBefore then Java was dynamicly typed language pretending it's staticly typed :) List doSth(Object a, Object b) { ... }
- vbezhenar 11y agoIt's questionable what's better: simple type system without generics (Java 1.4, Go), something in between (Java 1.5) or something full-featured but hard to learn (Scala). Scala pretends to solve this problem by "layering" code. Complex types are for libraries and users should use libraries. But IMO it never worked. Problems arising, "users" have to debug into library code and they have to deal with full-featured types anyway. My only real wish in regard to Java 1.4 was that I would be able to implicitly cast Object to anything (like I can in Objective C). That would help to reduce type clutter a lot.
- justthistime_ 11y ago> Scala pretends to solve this problem by "layering" code. From my perspective that's the large difference between Java and Scala. In Java, complexity leaks into the use-site (especially with Generics), in Scala it's possible to shield the user from that complexity.
- vbezhenar 11y agoIt's questionable what's better: simple type system without generics (Java 1.4, Go), something in between (Java 1.5) or something full-featured but hard to learn (Scala). Scala pretends to solve this problem by "layering" code. Complex types are for libraries and users should use libraries. But IMO it never worked. Problems arising, "users" have to debug into library code and they have to deal with full-featured types anyway. My only real wish in regard to Java 1.4 was that I would be able to implicitly cast Object to anything (like I can in Objective C). That would help to reduce type clutter a lot.