We took way less time to move from Java 11 to 17 compare to the 8 -> 11 migration due to the change in deployment methods: instead of deploying jar file and run it with the server-provided JRE, we now use docker to ship our app + JRE to server.
Once your language has aged a little it's hard to impossible to take old primitives away, but you still want to adopt ergonomic improvements in order to not be left behind. Until at some point you become a language nobody can master in its entirety.
curious; can you give a few examples? TIA
I would say the analogous feature to typeclasses are interfaces.
In terms of actual examples, I'll point to JEP 443, linked in the Java 21 article that kicked off this topic. That feature comes from Scala, by way of Kotlin.
Laziness by default is my favorite Haskell feature.
On the whole, I like it in Haskell. In languages without lazy evaluation (by default) I tend to miss it.
I've never seen it "ridiculed" by anyone proficient with the language or who used it for an actual project, either.
Meanwhile, no honest Haskell developer can claim to have never been surprised by a space leak at one time or another.
Why?
Becauze laziness is simply harder to reason about.
It's a lot like coding in something like Prolog, in that you need to internalize not just the behaviour of the program, but the behaviour of the Haskell runtime as well, and how laziness is actually implemented.
This makes it very challenge to reason about both space and time reliably, even for a seasoned developer.
The fact that whole tutorials are dedicated to picking the right fold so you don't leak space is a perfect encapsulation of the problem.
And for a language that emphasizes compile-time safety, it's a major class of bug that neither the compiler nor runtime help the user detect.
I've worked in many different languages and runtimes over the years and I've never encountered another feature that was equally complex.
I did answer. I've been hit by them. In general, the problems are fewer than without laziness, though. I've seen more problems in production caused by careless eager evaluation.
Are you an "honest Haskell developer" by the way, that you speak for all of them? "Be honest" in your answer, please.
> Becauze laziness is simply harder to reason about.
No, it's harder to reason about some aspects and easier to reason about some others, like gluing together code.
> I've worked in many different languages
But not Haskell, right? "Be honest".
I've never seen laziness ridiculed (not critiqued, but ridiculed, remember the context of the conversation you're in) by an actual practitioner, have you? "Be honest".
I absolutely have worked with Haskell and written a number of non-trivial programs in it, including a bytecode interpreter for a toy virtual machine.
I also spent quite a bit of time writing solutions to various coding challenges in Haskell, which gave me an appreciation for how hard it is to write high performance code in the language (anything touching strings, in particular, was a real joy...). I've never felt like I had to fight the runtime quite the way that I had to fight it with Haskell.
But yes, if I'm writing normal, run-of-the-mill, low complexity code, it's pretty easy to get Haskell right. But then in that circumstance it's easy to get it right in any language.
Of course, why would you believe me? You're already so sure your opinion is fact that I doubt anything I have to say will sway you.
Fair enough. Haskell developers do not think the language is perfect, and I've seen a fair share of critiques, but I've never seen laziness "ridiculed".
And since I believed you, believe me: whenever I deal with languages without easy recourse to lazy evaluation, I miss it. Every expression is clumsier.
> You're already so sure your opinion is fact that I doubt anything I have to say will sway you.
Are you a mind reader?
I suggest you go back and look at your first reply to me. Do you think it was crafted to elicit good mannered conversation?
Yup, that's fair, I came out swinging because I read this:
> They only ridicule it because they don't use it or understand it.
As belittling the intelligence of people who didn't share your opinion.
If that wasn't your intention and I read too much into your comment, then I absolutely apologize for jumping down your throat so aggressively.
Pretty poor tradeoff on the whole if you ask me - but Scala is always there for anyone with enough sense to pick it up.