An "extend" operator is a natural companion to <|

Axel Rauschmayer axel at rauschma.de
Wed Jul 20 01:18:13 PDT 2011


> From: Brendan Eich <brendan at mozilla.com>
> Date: July 19, 2011 21:16:29 GMT+02:00
> To: Luke Hoban <lukeh at microsoft.com>
> Cc: "es-discuss at mozilla.org" <es-discuss at 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

axel at rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110720/f424cec3/attachment.html>


More information about the es-discuss mailing list