optional "function" keyword

Kevin Smith khs4473 at gmail.com
Sat Mar 10 08:08:00 PST 2012


>
> I doubt that (simple) statistics are equally useful here, though: the
> current
> syntax is sufficiently awkward that programmers actively avoid using the
> very code patterns that short functions would help to make readable.
>

Thanks Claus - I understand but I think you're overstating.  In any case,
I've created a tool to count function expressions:

http://www.khs4473.com/function-expr-count/

Here's what I get for jQuery 1.7.1:

Total Function Expressions:  485 (100%)
Initial Value: 130 (26.804123711340207%)
Block: 355 (73.19587628865979%)

Node.js's http module:

Total Function Expressions 78 (100%)
Initial Value 2 (2.564102564102564%)
Block 76 (97.43589743589743%)

I'll run some others though it as time permits.

kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120310/94efaa3c/attachment.html>


More information about the es-discuss mailing list