On Sat, Mar 3, 2012 at 1:00 AM, Brendan Eich <[email protected]> wrote:
> I'm with Luke here. We shouldn't abuse a common idiom from other
> languages, including upstream ones such as CoffeeScript.
>
> Kris's suggestion of +> changed to deal with the "wrong direction"
> criticism (which I find compelling since the [[Prototype]] property is a
> reference):
>
> let sub = sup +< {p:1, q:2};
>
> (E4X ambiguity, no worries.)
>
> Comments?
I like, though <+ is a little easier on the eyes.
One argument for the "wrong direction" being wrong: if A <: B is common
math syntax for *A is a subtype of B*, if you turn the arrow around it'd
read *A is a supertype of B*, and this is fairly close to what <| was
trying to express.
>
> /be
>
>
> Luke Hoban wrote:
>
>> What do you think? Do you like -> better than<| ? Is it ok to not have
>>>>>>> it available for some possible future function shorthand?
>>>>>>>
>>>>>> Both => and -> have strong associations with function shorthands
>>>> from C#, Scala, C++, Java 8, Perl, CoffeeScript, ML, Haskell and more.
>>>> Whether or not JavaScript adopts a ->/=> shorthand in the future (I still
>>>> think it should), many developers will think of it as having an association
>>>> with functions. Using -> for the proto-of operator effectively also
>>>> removes the ability to use => as function shorthand later, due to the
>>>> syntactic similarity of these two operators.
>>>>
>>>
>> Any of these usages (at least for the more widely used languages) are
>>> fairly new so I don't know that they establish that strong of a precedent
>>> for ES.
>>>
>>
>> They are new now, but 5 years from now when ES6 has breadth adoption
>> these other languages will also be 5 years more established. Many
>> programmers will work in at least one of these other languages as well as
>> in JavaScript. There is also a relatively strong association of C-style
>> languages using ->/=> as function shorthand, and JavaScript is still (for
>> better or worse) primarily seen as a C-style language.
>>
>> Luke
>>
>> ______________________________**_________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>>
>> ______________________________**_________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss