3 ms·
Does anyone know if there is a JS dialect out there that adds support for callback-less async code without also adding a bunch of other coffeescripty syntax cha
by ufo 13y ago
Does anyone know if there is a JS dialect out there that adds support for callback-less async code without also adding a bunch of other coffeescripty syntax changes at the same time?
- simonster 13y agoThat would be TameJS: https://github.com/maxtaco/tamejs https://github.com/maxtaco/tamejs
- neilk 13y agoYes, it's called "JavaScript". Specifically, combining generators with promises. http://blog.alexmaccaw.com/how-yield-will-transform-node http://blog.alexmaccaw.com/how-yield-will-transform-node Definitely not as clean as a whole new language, but you can program like this today, at least in bleeding edge node and some recent browsers.
- mjw 13y agoTry http://www.neilmix.com/narrativejs/doc/ http://www.neilmix.com/narrativejs/doc/ -- "a small extension to the JavaScript language that enables blocking capabilities for asynchronous event callbacks".
- gfxmonk 13y agoStratifiedJS allows you to write callback-less async code, including full support for exceptions thrown from async code (stacktraces and all): http://onilabs.com/stratifiedjs http://onilabs.com/stratifiedjs (disclosure: I work at Oni Labs) It does extend JS with some additional syntax as well (new concurrency constructs as well as some syntactic sugar), but it doesn't alter existing JS syntax.