Early error on '0' followed by '8' or '9' in numeric literals does not seem to be web-compatible

Chris Peterson cpeterson at mozilla.com
Wed Aug 6 12:02:36 PDT 2014

 > On Aug 5, 2014, at 11:13 AM, Allen Wirfs-Brock <allen at 
wirfs-brock.com> wrote:
 > I think this is more or less the strategy we should follow.
 > All browsers in all modes apparently interpret leading 0 numbers that 
contain the digits "8" or "9" as decimal literals.  We should make that 
part of the base language for ES6.
 > The ES6 base language should make leading 0 numbers containing only 
octal digits ("1"-"7") syntactically illegal.

If the intent is to eventually permit leading 0 numbers as decimal 
literals, why forbid unambiguous numbers like `01`–`07` in the meantime?

Many of the websites broken by Firefox's new DecimalIntegerLiteral error 
are processing dates like `new Date(2014, 08, 06)`. Permitting `00`–`09` 
(with any number of leading zeros) but forbidding ambiguous `01234567` 
would be forward-compatible with your plan to eventually permit leading 
zeros while not breaking websites using Dates today.

Whether `01234568` would be permitted as decimal 1234568 is a subtler 

More information about the es-discuss mailing list