!Re: proposal: Object Members

Tab Atkins Jr. jackalmage at gmail.com
Fri Aug 3 21:37:43 UTC 2018

On Fri, Aug 3, 2018 at 2:33 PM Ranando King <kingmph at gmail.com> wrote:
> A side thought:
> If a language reserving certain words, even to the point of generating error messages related to using them under certain circumstances, doesn't constitute at least part of a justification for using them, then why do languages so often reserve keywords for future use? Isn't precisely the case with `private`, `protected`, `public`, and `package` (and `class` prior to ES6). Weren't they all holdovers from the fact that the syntax for ES was mostly borrowed from Java, and kept in reserve just in case the concepts behind these keywords became language features?
> If that's not the case, then there's no point in keeping these (or indeed any) keywords in reserve.

Yes, they were reserved because they were the Java reserved keywords,
with the intention that we might add more Java features later in the
langauge's evolution. That has no bearing on their use today.

Unreserving them wouldn't provide much benefit now. But keeping them
reserved still doesn't mean we have any particular need to use them.


More information about the es-discuss mailing list