|
|
|
|
|
by gfxmonk
4148 days ago
|
|
It seems like a lot of people are interested in fixing this, and would be keen to see a solution. I believe StratifiedJS is precisely that solution (for JS at least), and it has existed in working form for years: http://stratifiedjs.org/ (it's not just an experiment - it's remarkably stable). StratidiedJS completely eliminates the sync/async distinction at the syntax level, with the compiler/runtime managing continuations automatically. A `map` function in SJS works just like you would want, regardless of whether the mapping function is synchronous or not. In addition, it provides _structured_ forms of concurrency at the language level, as well as cancellation (which most async APIs don't support). Disclosure: I work on StratifiedJS, and just wish more people knew about it. |
|
How does stratifiedjs work under the hood? Does it switch out the stack?