top | item 23427346

(no title)

justryry | 5 years ago

This x1000. If you think Optional, Streams, and lambdas make Java close to Scala, you really don't know what you are missing. Some other big and small things off the top of my head:

- import aliases

- type members

- generic variance that doesn't make you want to gouge out your eyeballs

- generics over primitive types

- fully unified types

- an ecosystem that avoids nulls and exceptions

- pattern matching

- case classes

- everything is an expression

- immutable collections out of the box that most every library uses

- higher kinded types

- macros

Sure, maybe Java will get import aliases 20 years after they were due but I'm pretty sure half of that list will _never_ happen. Combined they are a huge deal for productivity, expressiveness, and safety. Java can't die due to the huge existing investments and continuing to improve the language is the right thing to do, but its really well past time for folks to consider more modern languages for new projects.

discuss

order

No comments yet.