Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 4864 days ago | link | parent

I would say "callback hell" and CPS are pretty much synonymous. And https://github.com/jashkenas/coffee-script/wiki/List-of-lang... has a section for "Synchronous to Asynchronous JavaScript Compilers (CPS)." My ChoppaScript currently has support for many textual macros that alleviate this issue, not that I use any of them. :-p

I actually prefer JS to most of these CPS-transforming variants of JS. I like having asynchrony be independent from imperative control flow, with no awkward questions about how "finally" and nonlocal exits are supposed to work.

Instead I think the notable part of this article is that they've implemented Outlet, a (mostly?) self-compiling Scheme dialect with a debugger. More general info here: http://jlongster.com/2012/01/04/outlet-my-lisp-to-javascript...

Much like Arc, it has certain abstraction leaks it doesn't close, without actually embracing the JavaScript platform that's leaking through:

"You'll notice in the last example that we can call native functions on objects. This is a funny result from the fact that Scheme identifiers allow "." in them, and Outlet simply copies the name into the javascript code. Javascript then evaluates it like normal. I don't intend build anything on this though. If you want to write javascript, write javascript."

However, like Arc, it has a rather concise implementation.