On Sat, Mar 3, 2012 at 5:20 PM, David Herman <dher...@mozilla.com> wrote:
> 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. > This is precisely why it can't really be overloaded any further. > > 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. Does it *have* to be ascii? The growlix space of unicode is vast: https://plus.google.com/109925364564856140495/posts Reaching into the depths of unicode was roundly panned during the function shorthand debates but Allen's reach for ◁ is compelling -- is it really so bad to just go all in for it? FWIW I personally think <| is just fine :) > Meanwhile, JavaScript has functions, and JavaScript has prototypes. We're > going to have to make some decisions. > > Dave > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss