sirisian / ecmascript-types

ECMAScript Optional Static Typing Proposal http://sirisian.github.io/ecmascript-types/
453 stars 4 forks source link

SharedArrayBuffer all typed arrays by default? #66

Open sirisian opened 2 years ago

sirisian commented 2 years ago

I've thought about this before, but I think this is important. I've done a few multi-threading projects. I think all arrays should be accessible across threads with any special considerations. The user shouldn't have to a:SharedArrayBuffer<T> explicitly.

I've been meaning to ask the TC39 people about introducing language level threading for a while since the current web worker stuff is a mess. Should probably write a proposal sometime.

sirisian commented 2 years ago

I've added this into the array section (and class value types) to ensure that all arrays by default can be shared across threads.