News for hackers. Stuff that matters.
Re:Whytheluckystiff's original domain back as an archive by robertlagrant on Thursday August 18, 2022 @06:42PM (#32515705)
Presumably that's not true for any code that uses modern keywords such as class or super or await as variable names.
Re:Whytheluckystiff's original domain back as an archive by bakkoting on Thursday August 18, 2022 @07:56PM (#32516223)
It is, actually. Well, "class" and "super" were never legal even before they became keywords, because the language was designed to evolve and those were obvious things which might be useful later. But "await" still works as a variable name outside of an async function, even today, precisely so that old code still works as it used to. There are some contortions in the specification (and implementations) required to make this work, but it does work. (I am one of the current editors of the JS specification.)
Re:Whytheluckystiff's original domain back as an archive by robertlagrant on Friday August 19, 2022 @02:01AM (#32517929)
Huh! Fair enough.
Re:Whytheluckystiff's original domain back as an archive by ecnahc515 on Thursday August 18, 2022 @07:44PM (#32516139)
I can't recall as I don't do Javascript development regularly, but doesn't that require `"use strict"`?