Safe, Closure-free, Serializable functions

Brendan Eich brendan at mozilla.com
Fri Sep 27 13:46:45 PDT 2013


Tom Van Cutsem wrote:
> var f = function(x,y) (z) {

Tiny bike-shed-ish comment that we need a linking punctuator so that 
arrow function syntax can be extended likewise:

var f = function (x, y) : (z) {...}

Arrow form showing expression body:

var f = (x, y) : (z) => x*y/z;

An alternative without a punctuator:

var f = (x, y) [z] => x*y/z;

Getting a bit C++1x'ish but it's not bad.

/be


More information about the es-discuss mailing list