Hacker News new | ask | show | jobs
by qsort 1990 days ago
That's definitely the path they're headed towards. @FunctionalInterface from Java 8 and type-inference from Java 11 and instanceof destructuring from Java 14 are the big changes. "Proper" modern Java is functional, at least at the surface level.

The big issue is that the ecosystem is kind of stuck; it's freaking 2021 and we're still targeting Java 8. Also the type system could be better, null references are everywhere even though there is Optional<T> (I wish it had optional strict null checks a la Typescript, but I'm not sure how realistic that is), and the fact that you can't have List<int> because generics won't work on primitives is just boneheaded.

But yeah, the language isn't the "Dog extends Animal" bullshit they teach you in school, at least not anymore.