Hacker News new | past | comments | ask | show | jobs | submit login

Java needs to be more flexible and expressive, that's all, type inference, traits,collections,function expressions ... some things already made their way into the language after years of inflexibility as a philosophy.

If the language improves, then frameworks and API can be made less verbose.

A lot of "design patterns" in Java were created simply because of the language lacking expressiveness and are thus obsolete now.




Most design patterns come way back from C++’s OOP hype area, actually.

Java just made those insane architectures possible due to not segfaulting at every turn, hence it also got associated with them. And indeed, many are “deprecated” by all the “new” features, including generics which is not exactly new.


It's not about just being more expressive. See the Brian Goetz quote. A more "functional style of programming", this means less mutation, more pure functions, e.g. Java's proposed records are immutable.


Minor nitpick: Records have been delivered in Java 16. Java 19 will also include the first preview for Record Patterns.


In general Java has picked up many features of the ML family of languages such as pattern matching, sealed classes, etc. It is so much fun to write compilers in Java using this stuff.

I code a lot of Python also, and I've been pleased to see pattern matching adding to Python by a process that seemed very similar to that in Java, that is, in both cases the feature was developed gradually with a lot of care to make sure it works well with the rest of the language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: