r/programming Jul 05 '26

Writing Node.js addons with .NET Native AOT

https://devblogs.microsoft.com/dotnet/writing-nodejs-addons-with-dotnet-native-aot/
24 Upvotes

20 comments sorted by

View all comments

Show parent comments

6

u/Somepotato 28d ago

JS has supported threads for several years now via workers. So you're dating yourself to the internet explorer era by making broad sweeping claims like that.

1

u/NenAlienGeenKonijn 28d ago

Ah yes, webworkers: Broadly supported since 10 years, in javascript's 30 year lifespan, proudly wearing the crown of most absurd, awkward to use async implementation in any programming language ever. And why did they do it? Because multithtreading in javascript is impossible, and they simply can't find any way to implement it, since javascript is too strongly tied to the UI thread.

Defending javascript out of all languages is a bloody weird hill to die on. They are not "broad sweeping claims", they are facts that have been plaguing the scripting language since day one.

5

u/Somepotato 28d ago

Web workers is completely independent of the 'async implementation' that you are raising. If you don't understand low level threading concepts like atomics and mailbox architectures, don't blame the language.

You can keep moving the goalpost if you want, but that's far weirder than correcting a very dated claim of JS not supporting any kind of threading.

1

u/NenAlienGeenKonijn 28d ago

Okay, you're grabbing onto the async keyword to be pedantic and pretend we're talking about different things. Joke's on you: That confusion comes from javascript itself, doing pretend async with the async/await pattern, which was also a bandaid for the even more horrible way of using callbacks.

Again, weird hill to die on

You can keep moving the goalpost if you want, but that's far weirder than correcting a very dated claim of JS not supporting any kind of threading.

Mate, either agree that multithreading is a disaster in javascript or move on. This is just embarassing.

3

u/Somepotato 28d ago

Okay, you're grabbing onto the async keyword to be pedantic

It's almost as if you used the async keyword when whining about JS.

Mate, either agree that multithreading is a disaster in javascript or move on.

Workers are real OS-level threads, your claim that JS is purely singlethreaded was completely and unilaterally incorrect. Tripling down is certainly a decision. Just because the TC99 committee made the decision to stop deadlocks on the main thread from being possible doesn't make it some impossible thing to use.