deleting strict references: SyntaxError or "syntax error"?

Boris Zbarsky bzbarsky at MIT.EDU
Wed Jun 11 08:16:00 PDT 2014

On 6/11/14, 11:08 AM, Sergio Maffeis wrote:
> According to paragraph 11.4.1 of ECMA262 v.5.1, and in particular to
> point 5.a of that paragraph, a catchable "SyntaxError exception" should
> be thrown when deleting a strict reference in strict mode.
> We found that current browsers instead terminate abruptly the script
> execution at parse time, with an error message. This behaviour is
> typical of "early errors", described in Chapter 16, but it is not
> obvious that the one above should be considered an early error. 
says that "delete foo" where foo is an identifier is an early error in 
strict mode, as far as I can tell.

> so, should every occurrence in the spec of the wording "throw a
> SyntaxError exception" be taken to have the implicit subscript "unless
> this can be reported as an early error", or are the browsers diverging
> from the spec?

Browsers are implementing ES6, not ES5.1.


More information about the es-discuss mailing list