July 2000 Draft
JavaScript 2.0
upnext

Tuesday, June 6, 2000


JavaScript 2.0 is an experimental proposal maintained by waldemar for future changes in the JavaScript language. The eventual language may differ significantly from this proposal, but the goal is to move in the directions indicated here and do so via a coordinated plan rather than adding miscellaneous features ad hoc on a release-by-release basis.

JavaScript is Netscape's implementation of the ECMAScript standard. The development of JavaScript 2.0 is heavily coordinated with the ECMA TC39 modularity subgroup. The intent is to make JavaScript 2.0 and ECMAScript Edition 4 be the same language, and this document will evolve as necessary to accomplish this.

Contents

Changes

The following are recent major changes in this document:

Date Revisions
Jun 6, 2000 Added discussion of constant expressions and related restrictions on the expressions page. Defined the [] operator. Added visibility modifier attributes.
May 26, 2000 Minor grammar changes and cleanups. Allowed attributes in var and const declarations in for statements. Added [no line break] assertions in various rules to prevent changing the meaning of JavaScript 1.5 programs. Simplified switch and block grammars without changing their meanings.
May 8, 2000 Changed the name of a default constructor from new to the same name as its class. This eliminated the various syntactic special cases of new in places where a member name was expected. Also allowed qualified identifiers as literal field names.
May 1, 2000 Rewrote packages page.
Apr 30, 2000 Made significant syntax changes (Parser Grammar and other pages): revised identifier qualifiers, primary expressions, and definition attributes; added attribute, namespace, interface, import, export, and use statements; changed package naming. Updated definition of scopes and namespaces on Concepts page. Updated list of keywords on Lexer page. Revised definition extent rules. Allowed multiple const, class, and interface declarations as long as only one is a definition. Rewrote variables, functions, definitions, and classes pages.
Feb 16, 2000 Updated machine type and operator overloading pages.
Feb 15, 2000 Updated grammar and discussions of concepts, types, expressions, statements, definitions, and variables, as well as the syntax rationale.
Dec 7, 1999 Removed field, method, and constructor from the semantics and replaced with creative uses of the static prefix.
Nov 11, 1999 Continuing major reorganization of this document....
Nov 5, 1999 Reorganized the document's structure into chapters. Structured the core language chapter more in the bottom-up style of the ECMAScript standard than in the previous issue-oriented style. Combined and moved rationales and issues into an appendix. Added introduction page. Removed or reworded many obsolete paragraphs throughout the document.
Nov 2, 1999 Modified the parser grammar: added [no line break] constraints, removed version lists after public keywords, added box and user-defined visibility keywords, and added named function arguments.
Oct 29, 1999 Revised the execution model based on recent ECMA modularity group discussions. JavaScript 2.0 now has a hybrid execution model instead of a pure dynamic one, which allows for better compatibility with JavaScript 1.5.
Oct 20, 1999 Added throw and try-catch semantic operators to semantic notation and used them to signal syntax errors detected by the semantics that would be impossible or too messy to detect in the grammars. Updated formal description pages to match recent ECMA TC39 subcommittee decisions: eliminated octal numbers and escapes (both in strings and in regular expressions) to match ECMAScript Edition 3, switched to using the Identifier : TypeExpression syntax for type declarations, and added local blocks and the local visibility specifier. Also simplified the parser grammar for definitions and removed the « and » syntax for regular expression literals.
Jul 26, 1999 Wrote description of semantic notation. Updated grammar notation page to describe lookahead constraints. Updated regular expression semantics to match ECMA working group decisions for ECMAScript Edition 3; one of these included changing the behavior of (?= to not backtrack.
Jun 7, 1999 Revised all grammars and semantics to simplify the grammars. Fixed several errors and omissions in the regular expression grammar and semantics. Added support for (?= and (?!.
May 16, 1999 Added regular expression grammar and semantics.
May 12, 1999 Added preliminary Formal Description chapter.
Mar 25, 1999 Added Member Lookup page. Released second draft.
Mar 24, 1999 Added many clarifications, discussion sections, and small changes throughout the pages.
Mar 23, 1999 Rewrote Execution Model page and split it off from the Definitions page. Added discussion of float to Machine Types.
Mar 22, 1999 Removed numbered versions from the Versions page; added motivation, discussion, and version aliasing using =. Removed angle brackets < and > from VersionsAndRenames.
Mar 16, 1999 Rewrote Types page. Split off byte, ubyte, short, ushort, int, uint, long, ulong into an optional Machine Types library.
Feb 18, 1999 Released first draft.

Waldemar Horwat
Last modified Tuesday, June 6, 2000
upnext