Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 11-Apr-2024 23:49:27 JST Alex Gleason https://choubey.gitbook.io/internals-of-deno/threading-model/default-threads -
Embed this notice
Iska (iska@catposter.club)'s status on Friday, 12-Apr-2024 03:47:41 JST Iska @alex@gleasonator.com dissapointing that javascript still lacks proper shared-memory multithreading
Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 12-Apr-2024 03:47:52 JST Alex Gleason @iska Yes. This one aspect makes me question my choices. But then I remember how hard it is to do anything in other languages because there's no support for them. -
Embed this notice
gentoobro (gentoobro@gleasonator.com)'s status on Friday, 12-Apr-2024 09:42:05 JST gentoobro @iska @alex This basically boils down to data structure synchronization. It's not feasible to make thread-safe data structures fast enough to replace every single object/dict/hash/array/whatever in the entire language for general usage. Unsynchronized access can lead to all sorts of errors that people don't expect out of a high-level language, like segfaults and memory corruption. C++ gives you a bazooka with 3 safeties and a 20 kilo weight on the muzzle, C gives you a semiauto Glock with no safety, Go gives you a captive bolt gun with a tag saying "don't place on your nuts". All of them still let you hose a data structure from another thread and laugh when it happens. JS is a padded cell filled with exotic full-auto nerf guns designed for unrestricted public access.
On top of that is the semantics of functions being atomic in execution with respect to other functions, but that can be changed.
Alex Gleason likes this.
-
Embed this notice