10 features of modern Java

Content:

Original link: 10 Modern Java Features Senior Developers Use to Write 50% Less Code / Martin blog.

First of all I don't agree with the implicit premise of: shorter code = better code. It is: more readable code = better code. Sometime shorter means more readable, but not always.

Modern Java today usually means features introduced *later* than Java 8.

If I look at those 10 and try to divide them in buckets.

I don't like: local variable type inference, optional callbacks. (2)

I like but do not consider important: pattern matching instanceof, switch expression, text blocks, stream while, Collectors toUnmodifiableList, Stream toList. (6)

I like and consider important: records, sealed classes. (2)

So I am not super impressed by the changes.

Comments: