Message from JavaScript discussions

January 2019

β€” Got solutionos?

β€” 

What solution you are reffering? 1, it's not for composition, compose something else. 2, dont use it, 3, it doesnt leave anything un-needed 4, dont use it

β€” But i think it will conquer minds of async freaks🀀

β€” 1. A general solution for handling async should be composable, in that it should model return values and eventual failures in a way that is flat and repeatable, halting is just too primitive to be practical for these things, promises allows us to not care about whether or not it's async since it has the composable property.

2. I won't.

3. Lots of things, safety for instance.

4. I won't, and rest of JS community won't either.

Message permanent page

β€” It's a normal threading primitive, hence it doesn't make sense in JS

β€” It's like a spinlock

β€” Terrible

β€” What about the opposite?

β€” If you had the ability to spawn threads and not wait for them

β€” Any shared resource implies waiting

β€” So you could just do:

let x = true;

fork(() => {
x = false;
});

while (x);

console.log('done');

β€” Only shared state