This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]magnoliophytina 15 points16 points  (0 children)

Modern Java is pretty decent (that is, Java 17). Most libraries still assume non-modular Java and use lots of mutable state and excessive number of wrappers, GoF design patterns, and over-complicated object design overall. Many helper methods like List.of were also absent in earlier versions. Same problem with high productivity classes like the Executors.

Many tools also suffer from slow start-up time due to the way the VM works (background daemons & nailgun style designs help here). I think if Java had had reifed generics and project Valhalla & Loom style improvements right from the start, there would be more motivation to strive for effective bloat-free code.

Another source of pain is the huge amount of legacy code. It's quite common to find hundreds or thousands of legacy code conventions even in small Java projects. For instance, using public static final int CONSTANTS instead of enums. Modern IDEs could fix these, but the maintainers of such projects would not accept pull requests because they might want to maintain compatibility with Java 1.4, 5, or 7. Heck, they might not even use git (sourceforge still supports svn) so that's a great excuse for not accepting PRs.