Finding a "safety syntax" for classes

David Herman dherman at mozilla.com
Sat Mar 24 15:39:20 PDT 2012


On Mar 24, 2012, at 3:01 PM, Nadav Shesek wrote:

> What about setting arbitrary expressions as the value for prototype methods? Being able to use higher-order functions to dynamically create functions is very important for functional style programming. I use it very often to decorate functions, compose functions together, set partially applied functions as methods, etc. It seems to be impossible with syntax proposed here - I think adding it to the "safety syntax" is very much needed and should not be over looked.

Yep, we already agreed to this -- see the grammar on Allen's "maximally minimal" proposal:

    http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes#class_declarations_and_expressions

Dave



More information about the es-discuss mailing list