Strict Mode and Function

Dmitry A. Soshnikov dmitry.soshnikov at
Wed Jun 2 02:13:31 PDT 2010


Recently I was writing an article about strict mode in ES5 

At the moment, the only implementation for testing is already mentioned 
here -- BESEN engine. BESEN still has some bugs (some of them I’ve 
reported while was writing the article and glad to see that several bugs 
are already fixed), but it is a good candidate for ES5 programming and 

Nevertheless, the talk isn't about BESEN, but about inconsistent of the 
"Annex C (informative) The Strict Mode of ECMAScript" entry and the test 
suite cases related with the strict mode and functions created via the 
Function constructor.

That bullet of the Annex C statements:

"It is a SyntaxError to use within strict mode code the identifiers 
/eval/ or /arguments/ as the Identifier of a FunctionDeclaration or 
FunctionExpression or as a formal parameter name (13.1). Attempting to 
/dynamically define such a strict mode function using the Function 
constructor/ (15.3.2) will throw a /SyntaxError/ exception."

I've posted a bug to the BESEN's author --

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

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.


More information about the es-discuss mailing list