JavaScript中的保留关键字'implements'有什么用吗?
Does the reserved keyword 'implements' in JavaScript have any usage?
我注意到 implements
是 JavaScript 中的保留关键字。但是,我还没有发现该关键字的任何用法。事实上,我知道 JavaScript 中没有接口的概念,不像 Java 等其他编程语言,后者在实现接口时使用 implements
关键字。尽管我对此进行了研究,但我找不到 JavaScript 保留此关键字的确切原因。
所以,我的问题是这个关键字被保留的原因是什么?
implements
是一个 Future Reserved Word,这意味着它是一个关键字,但目前在该语言中没有任何含义。
The following words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions.
The following tokens are also considered to be FutureReservedWords when they occur within strict mode code (see 10.1.1).
implements let private public yield
interface package protected static
此列表在最新的 ECMAScript 语言规范中有所不同,因为 let
, yield
, and static
已获得正式含义。
当前Reserved Word栏目:
enum is not currently used as a keyword in this specification. It is a future reserved word, set aside for use as a keyword in future language extensions.
Similarly, implements, interface, package, private, protected, and public are future reserved words in strict mode code.
我不明白 implements
关键字如何指代继承以外的任何东西,这向我暗示 technical committee 39(正式负责 ECMAScript 规范的机构)没有排除添加 isolation/inheritance.
的可能性
process for getting a feature added includes an input phase. IDL for ECMAScript 是可能会影响此功能的输入示例。
This repository is intended for an investigation into using an Interface Description Language (IDL) in the ECMAScript standard. It is not currently at a stage in TC39.
我注意到 implements
是 JavaScript 中的保留关键字。但是,我还没有发现该关键字的任何用法。事实上,我知道 JavaScript 中没有接口的概念,不像 Java 等其他编程语言,后者在实现接口时使用 implements
关键字。尽管我对此进行了研究,但我找不到 JavaScript 保留此关键字的确切原因。
所以,我的问题是这个关键字被保留的原因是什么?
implements
是一个 Future Reserved Word,这意味着它是一个关键字,但目前在该语言中没有任何含义。
The following words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions.
The following tokens are also considered to be FutureReservedWords when they occur within strict mode code (see 10.1.1).
implements let private public yield interface package protected static
此列表在最新的 ECMAScript 语言规范中有所不同,因为 let
, yield
, and static
已获得正式含义。
当前Reserved Word栏目:
enum is not currently used as a keyword in this specification. It is a future reserved word, set aside for use as a keyword in future language extensions.
Similarly, implements, interface, package, private, protected, and public are future reserved words in strict mode code.
我不明白 implements
关键字如何指代继承以外的任何东西,这向我暗示 technical committee 39(正式负责 ECMAScript 规范的机构)没有排除添加 isolation/inheritance.
process for getting a feature added includes an input phase. IDL for ECMAScript 是可能会影响此功能的输入示例。
This repository is intended for an investigation into using an Interface Description Language (IDL) in the ECMAScript standard. It is not currently at a stage in TC39.