Strict Mode and Function

Dmitry A. Soshnikov dmitry.soshnikov at
Wed Jun 2 11:38:28 PDT 2010

On 02.06.2010 22:22, Allen Wirfs-Brock wrote:
>> From: Dmitry A. Soshnikov
>> But he referenced to the conformance test suite --
>> and in particular for these test cases
>> --
>> where is said that "arguments" and "eval" are allowed in such cases:
>> -- arguments
>> -- eval
> These tests are valid.  The constructed function is not "strict" because its body does not contain a "use strict" directive.

Yeah, I've already found out it (mentioned it in the second letter right 
after the first one). But really, this sentence from the Annex C is 
confusing. And without attentive reading, it can confuse.

>   The strictness of the caller of the Function constructor does not affect the strictness of the constructed function.

That's not relates only for Function functions. The strictness of the 
caller does not affect any function. However, the strictness is 
inherited lexically for FD (function declaration) and FE (function 
expression). But not for the Function functions. And that exactly I was 
confused after reading only that bullet from the Annex C.

>> So, is it an err in the Annex C statement or the tests are incorrect? I don't see the
>> same restriction in the exact 15.3.2 section as it mentioned in the Annex C.
> See step 10 of

Yup, as I said, I've already found out it and updated the document. But, 
thanks anyway for additional clarifications -- I think it will be useful 
for other to avoid such confusions. Btw, step 9 of already 
informs us that Function function do not inherit the strictness from 
surrounding context(s).


More information about the es-discuss mailing list