logoalt Hacker News

ysleepyyesterday at 9:57 PM4 repliesview on HN

Java has gone full circle.

Java had green threads in 1997, removed them in 2000 and brought them back properly now as virtual threads.

I'm kinda glad they've sat out the async mania, with virtual threads/goroutines, the async stuff just feels like lipstick on a pig. Debugging, stacktrackes etc. are just jumbled.


Replies

gf000yesterday at 11:05 PM

I don't think comparing 97's green threads to virtual threads ever made sense.

Like their purpose/implementation everything is just so different, they don't share anything at all.

iknowstufftoday at 1:21 AM

In Rust debugging and stacktraces are perfectly fine because async/futures compile to a perfect state machine.

show 1 reply
rwoerztoday at 5:37 AM

They stopped at the Promises level with CompletableFuture that lead to "colored frameworks" like WebMVC vs. WebFlux in Spring.

show 1 reply
delusionalyesterday at 11:25 PM

Java didn't really "sit it out". It launched CompletableFutures, CompletionStages, Sources and Sinks, arguably even streams. All of those are standard library forms of async programming. People tried to make it catch on, but the experience of using it, The runtime wrapping all your errors in completion exceptions, destroying your callstacks, just made it completely useless.

show 1 reply