|
|
|
|
|
by samwillis
304 days ago
|
|
> I haven't kept track of what Oliver's doing here lately Please do go and check up what the state of using types to inform the compiler is (I'm not incorrect) On the area allocator, I wasn't clear enough, as stated elsewhere this was in relation to having something similar to isolates - each having a memory space that's cleaned up on exit. Python has almost identical semantics to JS, and has threads - there is nothing in the EMCAScript standard that would prevent them. |
|
Dart had very similar issues and constraints and they couldn't do a proper AOT compiler that considered types until they made the type system sound. TypeScript can never do that and maintain compatibility with JS.
Isolates are already available as workers. The key thing is that you can't have shared memory, other wise you can get cross-Isolate references and have all the synchronization problems of threads.
And ECMAScript is simply just specified as a single-threaded language. You break it with shared-memory threads.
In JS, this always logs '4'. With threads that's not always the case.