BTF Measurements

Kevin Smith khs4473 at
Tue Mar 13 11:12:23 PDT 2012

> Kevin, do you have time to attempt this?

Short answer: no.  : )

I think the previous analysis is undercounting potential "expression
functions".  Consider the following case:

    IO.File.readText(path, text => { console.log(text) });

Since we don't care what the callback returns, we could potentially rewrite
it as an "expression function":

    IO.File.readText(path, text => console.log(text));

I've rerun the analysis, creating another category for these single
statement functions
 If we include this extra category, then about half of the BTF candidates
may be suitable for rewriting as "expression functions" (depending on
whether the return value is significant in context).

This suggests that multi-statement and expression-type BTFs should be given
about equal priority with regard to syntax.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list