r/programming • u/kciter • Sep 01 '26
The Browser's Main Thread Is Expensive
https://kciter.so/posts/the-expensive-main-thread/en/
219
Upvotes
r/programming • u/kciter • Sep 01 '26
View all comments
Show parent comment
2
u/azhder Sep 02 '26 edited Sep 02 '26
What you consider proper is just how you trained yourself (or were trained) to look at things. JS is a language created to be embedded into other software. The moment you add “proper multithreading” whatever it may mean to you, it will be harder to incorporate it into other software that has its own ideas of what “proper multithreading” means.
Long time ago, a language came out that didn’t have its own I/O, but depended on libraries and the OS to provide it. It allowed it such a flexibility that it is still one of the most used languages. I am talking about C.
JS, like C, didn’t come with own I/O and doesn’t come with own multithreading. That’s the price for being ubiquitous. Oh, and multithreading isn’t a language feature of C, right? It is provided by the environment (correct me if I am wrong).
So, maybe ask for better environment, not the language to take upon itself to solve the environment.