On 3 March 2012 02:06, Luke Hoban <lu...@microsoft.com> 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.

I have to agree with Luke here.

Tiny bit of pedantry: using arrows for functions is not new at all, it
has been fairly common for functional languages for at least twice as
long as the total age of JavaScript. The only more recent news is that
it has also trickled into the mainstream over the last decade.

/Andreas
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to