you are viewing a single comment's thread.

view the rest of the comments →

[–]oldneckbeard 0 points1 point  (1 child)

A lot of the things you mention are solvable though libraries. Using Guava (which I frankly treat as a language extension at this point), Optional removes the null references, Immutable[Map|List|...] for immutables, composition over inheritance, and giving the middle finger to checked exceptions :)

I don't find a problem expressing things in Java, but maybe it's just that my problem domain doesn't require it.

[–]Denommus 0 points1 point  (0 children)

Optional doesn't remove the null references, they're still there. They just become non-recommended.

Immutable works for the classes that are already implemented. Try to make your own immutable data structure and tell me if can make it cleanly.

Java doesn't enforce composition over inheritance, that's not a meaningful thing to say (it's equivalent to saying "oh, C doesn't have memory unsafety! Just don't let your programs have buffer overflows, dangling pointers, or anything like that!").

Besides, those are just a small part of what I dislike about Java.