[1] https://openjdk.org/jeps/441 [2] https://openjdk.org/jeps/444 [3] https://openjdk.org/jeps/430
Java is becoming more like Rust, and I am here for it
21–30 of 71 posts
Re: Java is becoming more like Rust, and I am here for it
#22The article is using immutable records and sum types as “more like Rust” and I am just sitting in the corner, wondering whether everyone has forgotten that these things came from FP in the first place. In my mind, a language isn’t “Rust-like” because it uses concepts we learned in FP. We have languages like Haskell and, before it, ML. And I know ML didn’t invent it. We also have Scala, and for Scala, we don’t even ha…
Re: Java is becoming more like Rust, and I am here for it
#23It's consistently been impressive to me how thoughtful the Java language is being steered. Especially the explicit choice to NOT have an async keyword where other languages were all falling over themselves to add it, with all the complexity it entails (and in Rust it's a pretty awkward fit). Once projects Valhalla and Panama land Java will be transformed again. Exciting times.
I think async worked out pretty well with JavaScript. But that was added to an already async language, it was just verbose and awkward before the await keyword.
In a way, the lack of threading allowed `async` to be implemented without gotchas. In languages with first-class thread support, `async` implementations can run into thread issues. (Will the continuation run on the same thread? Does the code care?)
Re: Java is becoming more like Rust, and I am here for it
#24Re: Java is becoming more like Rust, and I am here for it
#25Re: Java is becoming more like Rust, and I am here for it
#26Re: Java is becoming more like Rust, and I am here for it
#27The article is using immutable records and sum types as “more like Rust” and I am just sitting in the corner, wondering whether everyone has forgotten that these things came from FP in the first place. In my mind, a language isn’t “Rust-like” because it uses concepts we learned in FP. We have languages like Haskell and, before it, ML. And I know ML didn’t invent it. We also have Scala, and for Scala, we don’t even ha…
F# "originated as an OCaml implementation", which runs on .NET with some C# interop support?
Re: Java is becoming more like Rust, and I am here for it
#28I think a better description is "Java is becoming more like C#", which got these immutable-by-default record types many years ago.
Re: Java is becoming more like Rust, and I am here for it
#29[flagged]
[0]https://soc.me/languages/stop-using-angle-brackets-for-gener...
Re: Java is becoming more like Rust, and I am here for it
#30I imagine the lineage here is more Scala than Rust, right? Not that Scala invented these concepts, but if you’re looking for proven features with JVM implementations to add to Java, you’re probably going to look to Scala (and Kotlin) first.
The OpenJdk team has said multiple times that their inspirations are coming from ML and not Scala or Kotlin.