News for hackers. Stuff that matters.
Re:Avoiding Nested Callbacks in JavaScript by starwed on Thursday June 30, 2011 @01:50PM (#2715030)
The currently being worked on future version of javascript will have less verbose syntax. Brendan Eich has blogged[1] about his proposals.

Instead of

  (function(x) { return x * x })
you could just write

  #(x) { x * x }.
[1]http://brendaneich.com/2011/01/harmony-of-my-dreams/
Re:Avoiding Nested Callbacks in JavaScript by reaktivo on Thursday June 30, 2011 @02:16PM (#2715123)
I really like the way functions are declared in Kaffeine[1]:

  (x) { x * x }
[1] http://weepy.github.com/kaffeine/docs/function_extensions.ht...
Re:Avoiding Nested Callbacks in JavaScript by nxn on Thursday June 30, 2011 @02:00PM (#2715062)
I thought the # shorthand for functions proposal was rejected?
Re:Avoiding Nested Callbacks in JavaScript by jashkenas on Thursday June 30, 2011 @02:10PM (#2715100)
It was indeed. None of the function shorthands made it into ES.next, but the current leading contenders are: http://wiki.ecmascript.org/doku.php?id=strawman:arrow_functi...

    (x) -> x * x
And http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda...

    {|x| x * x}