←back to thread

185 points chhum | 1 comments | | HN request time: 0.209s | source
Show context
PathOfEclipse ◴[] No.44006859[source]
I've been working in .NET/C# for the past few years, and while I'm happy with it, I still think the JVM/Java are the best ecosystem overall I've worked in. It's amazing how many things the Java ecosystem gets right that .NET gets wrong.

For instance, Java introduced the fork/join pool for work stealing and recommended it for short-lived tasks that decomposed into smaller tasks. .NET decided to simply add work-stealing to their global thread pool. The result: sync-over-async code, which is the only way to fold an asynchronous library into a synchronous codebase, frequently results in whole-application deadlocks on .NET, and this issue is well-documented: https://blog.stephencleary.com/2012/07/dont-block-on-async-c...

Notice the solution in this blog is "convert all your sync code to async", which can be infeasible for a large existing codebase.

There are so many other cases like this that I run into. While there have been many mistakes in the Java ecosystem they've mostly been in the library/framework level so it's easier to move on when people finally realize the dead end. However, when you mess up in the standard library, the runtime, or language, it's very hard to fix, and Java seems to have gotten it more right here than anywhere else.

replies(3): >>44007589 #>>44009996 #>>44010560 #
neonsunset ◴[] No.44007589[source]
> frequently results in whole-application deadlocks on .NET

Tell us you don't write any sort of .NET code without telling us so explicitly.

You should pick a platform you have better command of for back-handed comments.

Or at least you should try to do a better job than referencing a post from 13 years ago.

replies(2): >>44007813 #>>44007915 #
1. ◴[] No.44007915[source]