Main Page

Netscape’s proposal

Netscape’s proposal
When Netscape submitted its proposal to TC39, the future of Netscape Communications looked bleak.
Since that time, Netscape was purchased by Time Warner (then AOL Time Warner) and then summarily
disbanded, leaving the future of its Web browser strictly to the open-source Mozilla Foundation. The
Mozilla Foundation still supports the Netscape proposal (which can be viewed at
) and updates it periodically, although the last update noted was in June 2003.
Netscape’s proposal for ECMAScript would turn ECMAScript into a lightweight version of the Java pro-
gramming language. The goals listed in the proposal are the following:
Making the language suitable for writing modular and object-oriented applications
Making it possible and easy to write robust and secure applications
Improving upon ECMAScript’s facilities for interfacing with a variety of other languages and
Improving ECMAScript’s suitability for writing applications for which performance matters
Simplifying the language where possible
Keeping the language implementation compact and flexible
Although these goals seem pretty ambitious, the proposal is quick to point out that its authors do not see
ECMAScript as a replacement for C++ or Java, nor do they intend to push it in that direction.
In order to accomplish the goals listed previously, the Netscape proposal suggests a number of changes
to the language from the third edition. These changes include:
Optional strict typing and type checking of values.
As discussed throughout this book,
ECMAScript is currently a loosely typed language. The proposal asks to change this in order to
cut down on errors and bring ECMAScript more in line with other object-oriented languages.
More logical syntax for classes.
In the current edition of ECMAScript, a strict difference exists
between defining a global function and defining a class. This proposal suggests the use of the
reserved word
to make the syntax for defining classes more logical (and ultimately, more
Java-like). This would include using the
reserved word for more straightforward
inheritance and the introduction of private and protected scopes.
Addition of more types.
Because one of the main goals of the proposal is to allow for easier
interaction with other languages, it is suggested that the fourth edition of ECMAScript include
more types, such as integer and long, that are supported in other languages.
Keywords and reserved words
Netscape proposes the following keywords:
catch class
default delete
else export extends false
finally for
function if
import in
namespace new
null package private public
return super
this throw
typeof use
void while
Chapter 20
23_579088 ch20.qxd 3/28/05 11:44 AM Page 598

JavaScript EditorFree JavaScript Editor     Ajax Editor