do-while grammar

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Feb 8 15:17:27 PST 2011


Right, no "useful common semantics" doesn't means that there aren't specific (perhaps many) cases that will work in all current browsers.  It just means that it is hard to find a generalization of those specific cases that could be a useful implementable semantics that would be worth trying to spec.  One might be: the enclosing function only contains a single declaration for inner function F and all references to F must be in the same block as the declaration of F and follow the declaration.

Allen




On Feb 8, 2011, at 2:56 PM, Brendan Eich wrote:

> 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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110208/efd77694/attachment.html>


More information about the es-discuss mailing list