arrow syntax unnecessary and the idea that "function" is too long

Kyle Simpson getify at gmail.com
Sat May 7 16:40:11 PDT 2011


>> Based on what evidence are "we" concluding that the majority of the 
>> javascript developers want -> syntax for functions? The fact that 
>> coffeescript is the hot buzzword? Was there some developer-community wide 
>> voting or poll that I missed? Or is it that a few vocal people on these 
>> lists like it, and that's being substituted as what the "majority" is in 
>> favor of?
>
> IIRC there were cheers at JSConf this week.

Yeah, I unfortunately wasn't able to attend. I was quite sad about missing 
JSConf for the first time.

But, JSConf has just 150-200 JavaScript developers in attendance. While they 
are certainly some of the most passionate (and intelligent) developers of 
the community, no doubt, they are definitely not a representative sampling 
of the overall community. Making language decisions based on the vocal 
support of JSConf alone is not sufficient. I was certain there had to be 
more behind the claim than just that. So that's what I was asking for.


> But you're looking for something that doesn't exist: a way to make 
> scientifically sound decisions about language design.

I am not looking for any such thing. I was looking for more detail behind 
Brendan's (and Andrew's) assertions that -> is definitively better because 
it's shorter (and for no other stated reason).


> There is *no* way to resolve syntax questions perfectly. We welcome 
> community input, all community input.

I don't claim that any such perfect system could be devised. I was merely 
responding to Andrew's insinuation that the majority of the community 
(including him) had already voiced support for ->. If someone makes an 
implication, I think it's fair game on here to ask for the supporting 
reasoning.

I think I could easily come up with a dozen examples of patterns in 
JavaScript coding which are shorter, but which "most of the community" would 
say is *not* more readable. So I take issue with the assertion that 
shorter==better unequivocally.


> But we are going to have to make a decision, and it simply won't be 
> perfect. We're going to listen to everyone, consider the technical issues, 
> and at the end of the day, make the best decision we can with imperfect 
> information.

>From the tone of this thread, and from many other recent postings regarding 
reactions from JSConf this week, it sounded like all of a sudden we'd gone 
from "yeah coffeescript has some interesting short-hand syntax" to "the 
community has spoken, and coffeescript will be adopted into ES.Harmony/Next 
as-is".

I was, and am now, still wondering how "we" so quickly made the leap from 
Brendan's "harmony of my dreams" a couple of months ago, where the idea of # 
sounded good, and plausible for inclusion, all the way to Brendan declaring 
that it's basically a done deal that we'll be including a variety of 
function and other shorthands from coffeescript post haste?



--Kyle

 



More information about the es-discuss mailing list