On Mar 2, 2012, at 4:31 PM, 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.

This argument seems to over-reach. C and C++ use -> for pointer indirection. 
Perl uses -> for method calls.

> 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.

I don't know. If we want to use it for function shorthand, that's one thing. 
But every language defines its own syntax. And arrows are a very generic 
notation in CS, used for many, many more things than 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.

This is definitely true. We have only got so much grawlix space left in the 
universe to use. Meanwhile, JavaScript has functions, and JavaScript has 
prototypes. We're going to have to make some decisions.

Dave

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to