Hi Brendan,

The main contention about lambdas ignoring syntax is whether the completion-value creates a hazard that needs to be treated somehow, or even judged as fatal to the proposal.

Completion value, like the last thing to be evaluated in the lambda? What exactly is the nature of the hazard?

(To throw some more kerosene on the syntax fire, I would point out that "fun" for function nicely resembles "var" for variable:

   var x = fun y z => y + z;

but it's not big deal :)

Not bad but you lost the necessary (destructuring, default parameters) parenthesized formal list.

Right, an arguments list should still look like an arguments list:

    var x = fun (y, z) => y + z

or with an identifier:

    var x = fun fact(n) => (x < 2 ? 1 : n * fact(n-1))

I toyed with 'fun' instead of 'function' in 1995 but it would have been a misfit in the Java-esque/C-like keyword set, even with 'var' included.

In an alternate universe, you might have used 'method' for functions with a 'this' value, saving two characters and the name function for real functions :)

Cheers,

Michael

--
Print XML with Prince!
http://www.princexml.com
_______________________________________________
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to