News for hackers. Stuff that matters.
Re:List out of Lambda by tmhedberg on Friday April 05, 2013 @11:05AM (#5498838)
Agreed. I can't understand how something like

    function(x) {return function(f) {return f(x);};}
can be considered easier to comprehend than

    λx. λf. f x
Re:List out of Lambda by munificent on Friday April 05, 2013 @01:06PM (#5499611)
The grouping of expressions is clearer to many readers in the JS example. Unless you've spent a decent amount of time grokking the lambda calculus, the second line could be any of:

    (λx. (λf. f)) x
    (λx. (λf. f) x)
    (λx. (λf. f x))
The lambda calculus notation is weird. Using "." to separate parameter and body is unusual. The scope of the body isn't obvious.

JS is painfully verbose, but it's a verbose syntax many people have already put the time in to internalize.

Re:List out of Lambda by tome on Friday April 05, 2013 @02:03PM (#5499976)
Put the brackets in the lambda syntax then. It would be unambiguous and still clearer than the Javascript syntax.
Re:List out of Lambda by mrspeaker on Friday April 05, 2013 @11:14AM (#5498889)
In current Firefox nightlies (and soon everywhere (i.e. Firefox AND Chrome)) it's just:

    x => f => f(x)
http://wiki.ecmascript.org/doku.php?id=harmony:arrow_functio...
Re:List out of Lambda by mamcx on Friday April 05, 2013 @11:13AM (#5498885)
Not everyone is used to read that math notation. Is like say: "Why put it in JS instead of assembler?". JS is probably the most universal language out there (at least in terms of widespread).

I prefer this stuff in python. Less syntax, more clear. But then, is the same thing: You imagine your (math) syntax is better, I think is python, somebody will complain why not haskell, but js is more practical. Or, is just the one the OP like. That is probably the only and best reason.

Re:List out of Lambda by tmhedberg on Friday April 05, 2013 @11:22AM (#5498933)
> Not everyone is used to read that math notation.

Agreed, but it doesn't take more than a couple of sentences to describe the entire syntax of the λ-calculus. It's not hard to pick it up even if you've never encountered it before.

Contrast that with JavaScript, where even as someone who has written my fair share of it, my eyes tend to glaze over when they hit a string of `});}))());};`. Yet people happily write that sort of thing, then turn around and complain about nested parentheses in Lisp!