Function syntax

Nathan Stott nrstott at gmail.com
Thu May 19 12:43:47 PDT 2011


On Thu, May 19, 2011 at 12:53 PM, Bob Nystrom <rnystrom at google.com> wrote:
> On Thu, May 19, 2011 at 8:46 AM, David Griffiths <dxgriffiths at gmail.com>
> wrote:
>>
>> For all the talk about what's "usable" and "readable", I haven't seen much
>> mention of empirical testing done with ordinary people... (My sincere
>> apologies if there's some usability test lab for middlingly intelligent
>> JavaScripters that I'm not aware of).
>
> That data is out there in the context of C#. C# 2.0 used this syntax for
> local functions:
>   delegate(int x, int y) { return x + y; }
> In C# 3.0, they added:
>   (x, y) => x + y
> Aside from the type annotations, those almost perfectly mirror the current
> discussion for JS. A motivated person could do some archeology of open
> source code to find out how much each is being used. I was doing a lot of C#
> when 3.0 came out and watched a number of people learn the new syntax. It
> generally went like:
> 1. Lambdas? Never heard of them.
> 2. What is this weird arrow thing? I don't like it.
> 3. Eh, I kind of understand what's going on, but it seems fishy.
> 4. Hey this is pretty terse.
> 5. OMG, working with collections is a breeze now! I just chained five maps
> and filters!
> 6. How did I ever live without this?
> - bob
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


More information about the es-discuss mailing list