How about replacing <| with ->

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Mar 1 16:34:04 PST 2012


It was recently suggest to me that it is unlikely that we will ever adopt -> as as function expression shorthand symbol and that this means we could consider using that symbol sequence for other purposes.  In particular, it would be a reasonable and possibly less controversial alternative to the <| symbol.  I would have no objection to that switch and have written the suggestion up at http://wiki.ecmascript.org/doku.php#suggestion_to_replace_with 

Some examples of this usage of -> include: 

  MyObject.prototype -> {a:1,b:2}
  appArrayBehavior->[0,1,2,3,4,5]
  let subclass = superclass -> function () {};
  var p = newRegExpMethods -> /[a-m][3-7]/

What do you think? Do you like -> better than <| ?  Is it ok to not have it available for functions?

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120301/1ec6e278/attachment-0001.html>


More information about the es-discuss mailing list