On Mar 5, 2014, at 6:53 PM, Allen Wirfs-Brock <al...@wirfs-brock.com> wrote:
> 
>> On Mar 5, 2014, at 6:23 PM, Brendan Eich wrote:
>> 
>> John Barton wrote:
>>> As you say "all browsers seem to allow it". Browsers made the mistake and 
>>> we should not go back now and blame developers on smaller sites because 
>>> they use this kind of code. Make it a syntax error in modules and save 
>>> yourself a lot of headaches.
>> 
>> We could do this for sure, and in the absence of evidence that if (x) 
>> function y(){} is used in the wild, we should. With such evidence, we 
>> should. So, we should ;-).
>> 
>> But there's more to consider. IIRC, originally KJS (pre-JSC) in WebKit did 
>> not support function-in-block or function-in-unbraced-consequent. Then they 
>> added function-in-block support, bowing to the well-known uses on the Web. 
>> When did they add function-in-unbraced, and why? Perhaps someone can cite 
>> the fixed webkit.org bug.
> 
> We would have to come up with an an appropriate intersection semantics and we 
> don't have a base ES semantics to work off of as a function declaration is 
> illegal in that posiion in ES6. Would we also have to accommodate it for 
> IterationStatements and WithStatement

Right, it is not free - nothing around here is!

The other way to go optimizes for the reason WebKit folks added unbraced 
support no longer applying: leave draft ES6 as is, implement and test among 
major browsers, and see what comes out in the wash.

If no one else looks, I will try to find the WebKit.org bug trail.

/be

> 
> Allen
> 
> 
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to