4 ms·
It's interesting that rather than building a micro-library they've chosen to use a compile time instead. I guess I'd prefer to see this integrated into my usual
by sh1mmer 18y ago
It's interesting that rather than building a micro-library they've chosen to use a compile time instead. I guess I'd prefer to see this integrated into my usual JS libraries (YUI, jQuery).
That said it's pretty interesting. Even if some of the syntax is slightly jarring.
- apgwoz 18y agoBut, it extends the syntax of JS, so the only thing one can do, is to create a compiler for it to compile into JS that is compatible with the target interpreter (most likely a web browser). In this case, I believe he outputs the "compiled" (more appropriately maybe, "transformed") code in Continuation Passing Style[1] where appropriate. [1]: http://en.wikipedia.org/wiki/Continuation-passing_style http://en.wikipedia.org/wiki/Continuation-passing_style
- chumsley 18y agoNeil Mix implements similar transformations in Javascript in Narrative JS: http://www.neilmix.com/narrativejs/doc/ http://www.neilmix.com/narrativejs/doc/. However, as I recall it aims more to provide some of the main benefits of continuations rather than a complete implementation of continuations on top of Javascript, which is more where I was trying to go with jwacs. Jwacs introduces very little new syntax to Javascript; I'm curious to hear which bits you find jarring, and what you would have preferred to see.
- andreyf 18y agoWelcome to news.YC! I'm a big fan of your work (well, jwacs and markdown.el) ... would love to see you as a regular around here :) Aside: http://versions.tech.coop/movies/jwacs.mov http://versions.tech.coop/movies/jwacs.mov server is down... do you have a backup?
- chumsley 18y agoThanks very much! For both the welcome and the compliments. :) Sadly, I do not have a backup of the presentation movie; hopefully Bill Clementson has one.
- olavk 18y agoI don't think it is possible to implement continuations as a library.