arguments.callee in Harmony

Charles Jolley charles at sproutit.com
Fri Sep 25 16:45:25 PDT 2009


ok. then I retract my previous statement (that I could imply one from  
the other).  though I do think standard sugar for detecting strict  
mode presence would be awesome! -C

On Sep 25, 2009, at 4:25 PM, Brendan Eich wrote:

> On Sep 25, 2009, at 4:23 PM, Brendan Eich wrote:
>
>> On Sep 25, 2009, at 4:22 PM, Charles Jolley wrote:
>>
>>>> Not sure how you can assume the latter from the former:
>>>
>>> if (! function() { "use strict"; return this; }()) {
>>> "use strict";
>>>
>>> /* I'm an ES5 browser and DEFINITELY in strict mode now; doesn't  
>>> matter what came before me... */
>>> }
>>
>> Gotcha -- I wouldn't call that assuming, since you had to say "use  
>> strict" twice. But I was being a logic nerd. Carry on!
>
> Today is short message with error-correcting followup day. :-/
>
> You can't write "use strict"; as a pragma at the start of a block.  
> You have to do it at the start of a function body or program.
>
> /be



More information about the es-discuss mailing list