News for hackers. Stuff that matters.
Re:Escape from Callback Hell by ufo on Sunday March 03, 2013 @11:49AM (#5314289)
Fair enough. It might be a breaking change but wouldn't it be nice if instead of having to rewrite everything into continuation passing style (a boring and error prone process!) you could just do something simple like

    var a = await someBigFunc()
or

    do
      a <- someBigFunc()
Javascript in its current state is not built for supporting CPS programming very well. You often end up needing to reimplement control flow primitives like while loops, break statements and exception handling since those don't play nice with async stuff.
Re:Escape from Callback Hell by GeZe on Sunday March 03, 2013 @12:44PM (#5314489)
This syntax already exists in LiveScript (http://livescript.net/#backcalls) which compiles to straightforward JS.

    a <- doFirstThing()
    b, c <- doSecondThing(a)
    doFinalThing(b + c)