block scope and function declarations

Andy Wingo wingo at igalia.com
Wed Feb 15 09:53:33 PST 2012


Thanks for the note, Allen.

One remaining doubt:

On Wed, 2012-02-15 at 09:02 -0800, Allen Wirfs-Brock wrote:
> At the last TC39 meeting it was hypothesized that the block nested
> function declaration patterns that are actually used inoperably on the
> web would continue to work if interpreted as lexical (let-like)
> declarations.

What about "conditional function definition"?

E.g.:

  https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope#Conditionally_defining_a_function

or Oliver's comments here:

  https://bugs.webkit.org/show_bug.cgi?id=27226#c5

It seems like a valid use case that needs an answer.  The answer might
be, "just use declarations, assignments, and function expressions";
dunno.

Regards,

Andy


More information about the es-discuss mailing list