Modern Java

48 points by chris-evelyn


radarroark

Didn't see any mention of sealed interfaces, which are IMO one of the least appreciated improvements to the language. They are essentially union types for Java and you can implement them on records as of 17. And as of 21 you now have exhaustive switch statements that work with them. It completely changes the programming model from inheritance and dynamic dispatch to ADTs.

It took them a while but I respect how slow it they evolve the language; it's my favorite among the mainstream ones for that reason. They didn't jump on the async/await bandwagon many years ago and now they have a much more general solution with virtual threads and aren't saddled by coloring / API duplication that C# has to deal with. It's become a pretty great language.

chris-evelyn

Randomly stumbled upon this little book. It accomplished two things:

  1. Gave me a "What, Java is kinda good now?" moment
  2. The writing made me laugh a little