2 ms·
Who cares about keyword count? Reserved words preserve flexibility while not realistically impairing programmer expression. What do you do with a keyword-impove
by quotemstr 2y ago
Who cares about keyword count? Reserved words preserve flexibility while not realistically impairing programmer expression. What do you do with a keyword-impoverished language?
1) overload the keywords you do have to mean random unrelated things depending on context (which is why "static" in C++ means a bunch of random things), or
'
2) create context-dependent keywords (e.g. "final" in C++ and "match" in Python), which work, but complicate every parser everywhere.
As much as it pains me to type the following: JavaScript got it right. The initial version of the language reserved a number of keywords (e.g. "class") that would only become useful two decades later.