|
|
|
|
|
by za3faran
1073 days ago
|
|
Java's designers have consistently mentioned the approach they're taking that Java has the last mover advantage. They cautiously see what features other languages applied, and take what gives them the highest value compared to the complexity introduced. Java's virtual threads are already superior to golang's approach because they're working on structured concurrency from the start. Value types are a huge proposition, but they seem to be coming along nicely. They have already baked in nullables/zero values into the design, something that is a pain in golang, and a big gotcha and source of bugs. The interesting thing is that Java already beats golang because of its superior GCs, particularly in large programs, so it will be interesting to see what sort of performance improvements come out of value types. |
|
There's nothing one can do to wiggle away from designing something. You can only make tradeoffs. In this case, Java's sacrificing time. Is that a good call? I don't know.
> They cautiously see what features other languages applied, and take what gives them the highest value compared to the complexity introduced.
They've historically shown poor taste in the features they've chosen, so this strategy doesn't seem to have worked out all that well. Waiting longer doesn't help if you don't know what you're doing.
> Java's virtual threads are already superior to golang's approach because they're working on structured concurrency from the start.
Already? Ten years later! Time matters.
We'll see how much actual adoption there'll be, Go was built with its concurrency solution in mind, so not only are the primitives ergonomic to use, but the entire ecosystem has grown around it. You can't match it in a day.
> Value types are a huge proposition, [...]
"Value types" is a misnomer anyway, it's just "types". We've had those since at least C, some 50 years ago.
> [...] but they seem to be coming along nicely.
I've been hearing this for a while, has it been a decade yet?
> They have already baked in nullables/zero values into the design, something that is a pain in golang, and a big gotcha and source of bugs.
You can't be serious. Complaining about another language's null problems from the perspective of Java?
> The interesting thing is that Java already beats golang because of its superior GCs, particularly in large programs, so it will be interesting to see what sort of performance improvements come out of value types.
It's a wash most of the time AFAIK. Unless we do the classic Java benchmark trick of ignoring memory usage.