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

Mark S. Miller erights at google.com
Tue Aug 5 08:19:41 PDT 2014


On Tue, Aug 5, 2014 at 8:14 AM, Mathias Bynens <mathias at qiwi.be> wrote:

> On 5 Aug 2014, at 17:05, Mark S. Miller <erights at google.com> wrote:
>
> > Because of compatibility constraints, JS history can generally proceed
> only in an additive manner, which means a steady degradation of quality
> along the "simplicity" dimension. An opt-in mode switch is the only way to
> escape that dynamic. Strict mode is the only one we've got, and the only
> one we're likely to have in the foreseeable future. Strict mode should not
> accept octal literals. Regarding sloppy mode, it continues to exist only
> for the sake of legacy compat, so adding more crap to it for better web
> compat is the right tradeoff -- as long as the crap stays quarantined
> within sloppy mode.
>
> My point was that the crap under discussion is already available in strict
> mode in existing implementations (except for the one in
> Firefox/SpiderMonkey). It’s just not demonstrated yet if The Web depends on
> this functionality in strict mode too. (It not working in Firefox is an
> indication that it may not, sure.)
>

Yes, the FF situation seems an adequate demonstration.



On Tue, Aug 5, 2014 at 8:17 AM, Mathias Bynens <mathias at qiwi.be> wrote:

> On 5 Aug 2014, at 17:05, Mark S. Miller <erights at google.com> wrote:
>
> > Strict mode should not accept octal literals.
>
> The literals under discussion (e.g. `08` and `09`) are not octal literals.
>


Strict mode should reject these even more vehemently! (Allen, can we have
an early vehement error?)


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140805/1939193f/attachment.html>


More information about the es-discuss mailing list