> From: Brendan Eich <bren...@mozilla.com> > Date: July 19, 2011 21:16:29 GMT+02:00 > To: Luke Hoban <lu...@microsoft.com> > Cc: "es-discuss@mozilla.org" <es-discuss@mozilla.org> > Subject: Re: An "extend" operator is a natural companion to <| > > > On Jul 19, 2011, at 11:56 AM, Luke Hoban wrote: > >> The arguments in favor of a library alternative are: >> 1) Immediately useful to all JS developers >> 2) Simple, understandable syntax consistent with existing practice > > I agree with all this, but demur here: > > >> From discussions with some Microsoft dev teams, that could be a 3+ year >> difference in adoption timeline. > > If this is a give me the goods now argument, and the goods can be expressed > via functions, I'm with you. > > If this is "new syntax takes too long to be usable due to downrev browsers, > mainly IE", then that's no reason to stall progress on usable and new syntax > for novel semantics (i.e., shallow continuations). Harmony requires not > putting the language into a no-new-syntax straightjacket. That was ES3.1 -> > ES5, and we are past it. > > But I quite agree that we should consider functions as alternatives to > special forms where they are plausible (so, not for yield, to pick up the > shallow continuations example).
The <| operator looks so good and is so useful that I would consider the possibility of having both the operator and an Object.* (or module!) method that does the same, even though that is redundant. But it would allow you to use the method/function in portable code and use the operator in Harmony-only code. -- Dr. Axel Rauschmayer a...@rauschma.de twitter.com/rauschma home: rauschma.de blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss