Remix.run Logo
pants2 2 hours ago

Certainly not the "one way to write it" idea. Java has a ton of language features.

gf000 2 hours ago | parent [-]

Not really. It has a pretty bare bones OOP (single inheritance, interface), primitives and objects, generics and pretty much that's it.

Newer features fit very nicely and didn't increase the language surface (records are just a normal class with some methods auto-generated, while sealed types are just a restriction on who can subtype an interface -- and yet these give full ADT support for the language that improves readability and type safety).

jimbokun 31 minutes ago | parent [-]

Annotations add a seemingly infinite amount of new semantics. You can’t predict anything with confidence just looking at the code without also studying the annotation processors in depth, which regular Java tools don’t help you with.