3 ms·
> I'm not an ES[0-9] ninja enough to know what the practical implication is of those decisions Well, it makes it non-compliant and makes it unable to run some
by arghwhat 3y ago
> I'm not an ES[0-9] ninja enough to know what the practical implication is of those decisions
Well, it makes it non-compliant and makes it unable to run some (horrible, yet compliant) ES5 scripts. "undefined", "arguments", "globalThis", "window" and "self" are just variables which can be aliased and overwritten, so considering them keywords is broken.
Disallowing "const" and "let", which only became reserved in ES6, isn't a big deal as any modern interpreter uses them, but does also limit valid ES5 scripts from running.
(And yes, it's very weird that "undefined" is just a property on the global object that has not been assigned a value. Feels like someone trying to be "smart" instead of just giving it a keyword...)