Hacker News new | ask | show | jobs
by seanparsons 1158 days ago
Well it's not really ushering it in, given that this is what Haskell has had for a decade at least.
2 comments

Well, yeah. Haskell is a research language, while Java's stated design philosophy from day one has been to be conservative with adding new features, and judiciously add new features after they've proven useful in other languages.
So how does that make a difference to my point? The title is literally false as multiple other languages have already done it, Haskell in fact has even rewritten the underpinnings at least once the feature has been there so long.
The fact that X exists doesn't mean the "era of X" has started yet, you have to have the exponential adoption curve. The "Internet Age" started several years after the Internet was created

And clearly, adding this feature to Java is going to be like putting a web browser in Windows 95

To be fair though M:N threads aren't the provenance of research language, Go and Rust both have them, and I'm sure some other languages.

(But it's awesome Java has them now too, other languages getting the feature earlier doesn't really devalue it.)

My point is that they're on diametrically opposite ends of the language-philosophical spectrum.
.net has had this feature for a decade++
Are you sure? All the discussion I can find online makes it seem to me like TPL and friends are just executing tasks on thread pools until completion. (see e.g., https://github.com/dotnet/runtime/issues/50796 for some discussion)
What is the virtual thread feature in .NET called? I can't find any information about it.
Yeah, so has a lot of languages. See the previous comment.
you’re trying to support “judicious and conservative” but realistically java is on a lifeline like fortran, delphi and objectiveC
Fair enough.
Rust doesn’t have them, though.
In what way? async-std and tokio both support M:N.
But they can’t turn blocking calls to non-blocking which is the whole point, that requires runtime support.
Oh interesting, that's very cool, I didn't realize Java was doing that. That's a different axis than M:N though (cooperative versus preemptive) and you could definitely write a preemptive async runtime for Rust (rtic comes to mind). But the async-std and tokio runtimes are certainly cooperative.

(As a note, cooperative scheduling also requires a runtime - Rust might not "have a runtime" by default but you need to opt into one to use async.)

What's haskell? \s