I updated the tool so that it doesn't count function expressions that reference "this" (as those aren't suitable for => functions).
http://www.khs4473.com/function-expr-count/ For most of the libraries that I've ran through it, 60-75% of the functions it scans are of the "block" type. I haven't run it on any "application" code yet. kevin On Sat, Mar 10, 2012 at 11:08 AM, Kevin Smith <[email protected]> wrote: > 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 >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

