4 ms·
ES5 had "future reserved words" including class, const, export, import, and let.
by klodolph 4y ago
ES5 had "future reserved words" including class, const, export, import, and let.
- livrem 4y agoJava has goto and const as reserved keywords. Source: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_k...
- kps 4y agoC orignally had `entry` as a reserved work (from Fortran 77, where a function could have multiple entry points).
- WorldMaker 4y agoThe ES5 case is interesting because most of that list of "future reserved words" was a list of reserved words in ES4 "The Lost Version". That list also included fun things still not used like private, public, abstract, package, byte, int, volatile, synchronized.
- WorldMaker 4y agoOne additional fun thing to note is that despite "private" already being reserved as a keyword TC-39 when they did somewhat recently add private fields to classes a few years back decided on "hash names" over the private keyword. class Example { #privateFieldName } Rather than: class Example { private privateFieldName } The debate on that was pretty interesting.