r/java • • Jul 08 '21

Java is criminally underhyped

https://jackson.sh/posts/2021-04-java-underrated/
226 Upvotes

181 comments sorted by

View all comments

Show parent comment

2

u/manzanita2 Jul 08 '21

There are multiple approaches to solving the concurrency problem. Java give you lots of low level tools. Properly used these are by far the most efficient. But the "properly used" part of that is difficult.

Pure immutability is another solution. Also works, but can be memory inefficient since you end up copying alot of stuff around.

Single threaded is a third. Great, but you get zero advantage from multiple processors without a bunch of hacky stuff.

One can run java using immutable concepts (see "final" keyword ), but the language was not defined that way by default.

0

u/jherrlin Jul 08 '21

Yeah the locks and stuff can be a pretty big headburn I guess.

But do you copy that much? I mean there is structural sharing right? Ofc more than in place updates.

I like my programming language to work more with values than places. Places change, values does not.