On Feb 8, 2011, at 2:41 PM, Allen Wirfs-Brock wrote:

>> The other one I know of is nested named function declarations 
>> <http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls>.
>>  And there was an ASI mis-description for "break" and "continue" that was 
>> corrected between ES5 and ES5.1.
> 
> There really isn't any useful common semantics for function declaration in 
> blocks.  See 
> https://blogs.msdn.com/b/ie/archive/2010/08/25/chakra-interoperability-means-more-than-just-standards.aspx
>  

Yet we keep running into bugs where someone uses function-in-block intersection 
semantics.

Clearly it's useful, since we want it in Harmony. Of course, it's not supported 
so developers counting on it are on thin ice regarding name collisions, name 
leaks, etc.

Most recent example:

https://bugzilla.mozilla.org/show_bug.cgi?id=630851

See https://bugzilla.mozilla.org/show_bug.cgi?id=630851#c8 in particular.

Nevertheless, we are banning function-in-block under Firefox 4's ES5 strict 
mode implementation.

/be

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to