- ECMAScript
Infobox programming language
name = ECMAScript
paradigm =Multi-paradigm : prototype-oriented, functional, imperative, scripting
year = 1997
designer =Brendan Eich ,Ecma International
turing-complete = Yes
typing = duck, weak, dynamic
implementations =
dialects =JavaScript ,ActionScript ,JScript ,QtScript ,JScript .NET ,DMDScript ,InScript
influenced_by = Self,HyperTalk , AWK, C,Perl , Python, JavaInfobox file format
name = ECMAScript
icon =
caption =
extension =.es
mime = application/ecmascript [RFC 4329]
type code =
uniform type =
magic =
owner =Sun Microsystems ,Ecma International
released = June 1997
latest release version = Edition 3
latest release date = December 1999
genre =Scripting language
container for =
contained by =
extended from =JavaScript
extended to =
standard =
url = [http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMA-262] ,
[http://www.ecma-international.org/publications/standards/Ecma-290.htm ECMA-290] ,
[http://www.ecma-international.org/publications/standards/Ecma-327.htm ECMA-327] ,
[http://www.ecma-international.org/publications/standards/Ecma-357.htm ECMA-357]ECMAScript is a
scripting language , standardized byEcma International in the ECMA-262 specification. The language is widely used on the web, and is often erroneously referred to asJavaScript orJScript , after two major dialects of the specification.History
JavaScript was originally developed byBrendan Eich of Netscape under the name Mocha, later LiveScript, and finally renamed to JavaScript. In December 1995Sun Microsystems and Netscape announced JavaScript in a press release. [ [http://wp.netscape.com/newsref/pr/newsrelease67.html JavaScript Press Release] ] In March 1996Netscape Navigator 2.0 was out, featuring support for JavaScript.Due to the wide-spread success of JavaScript as a client-side scripting language for web pages,
Microsoft developed a compatible language known as JScript. JScript added new date methods to fix the non-Y2K-friendly methods in JavaScript, which were based on [http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html java.util.Date] . [ [http://weblogs.mozillazine.org/roadmap/archives/2008/04/popularity.html Brendan's Roadmap Updates: Popularity] ] JScript was included inInternet Explorer 3.0, released in August 1996.Netscape submitted JavaScript to
Ecma International for standardization; the work on the specification, ECMA-262, began in November 1996. [ [http://cgi.netscape.com/newsref/pr/newsrelease289.html JavaScript Standardization Press Release] ] The first edition of ECMA-262 was adopted by the ECMA General Assembly of June 1997. [ [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf ECMAScript 3rd Edition specification] ]ECMAScript is the name of the scripting language standardized in ECMA-262. Both JavaScript and JScript aim to be compatible with ECMAScript, while providing additional features not described in the ECMA specification.
The name "ECMAScript" was a compromise between the organizations involved in standardizing the language, especially Netscape and Microsoft. Brendan Eich, the creator of JavaScript, is on record as saying that "ECMAScript was always an unwanted trade name that sounds like a skin disease." [ [https://mail.mozilla.org/pipermail/es4-discuss/2006-October/000133.html es4-discuss: Will there be a suggested file suffix for es4?] ]
Versions
There are three editions of ECMA-262 published, and the work on the fourth edition is in progress.
Fourth edition
The ECMA-262 fourth edition is the first major update to ECMAScript since the third edition published in 1999. The specification (along with the reference implementation) is currently under development and was targeted for completion by October 2008. [ [https://mail.mozilla.org/pipermail/es-discuss/2007-October/001281.html es4-discuss: ES4 overview paper released] ] An [http://www.ecmascript.org/es4/spec/overview.pdf overview] of the language was released by the working group on
October 22 ,2007 .As of August 2008, the ECMAScript 4th edition proposal has been scaled back into a project codenamed ECMAScript Harmony.
Features
The new version of the language is mostly backwards compatible with ECMAScript 3 (see below), while adding multiple new features, such as:
* Classes
* Structural types
* Packages and namespaces
* Optional type annotations andstatic typing
* Generators anditerator s
* Destructuring assignment
*JSON encoding/decoding
*Algebraic data types ECMAScript 4 intends to better support "
programming in the large " and to let programmers sacrifice some of the script's ability to be dynamic for performance. For example, Tamarin — the virtual machine for ActionScript developed and open sourced by Adobe — has JIT compilation support for certain classes of scripts.Bug fixes and backwards compatibility
In addition to introducing new features, some ES3 bugs are fixed in edition 4. [ [http://ejohn.org/blog/bug-fixes-in-javascript-2/ John Resig - Bug Fixes in JavaScript 2] ] A document describing known [http://www.ecmascript.org/es4/spec/incompatibilities.pdf incompatibilities] between ES3 and ES4 is available.
Implementations
Since the specification is not yet finished, there are no full implementations of the language at this time. However several implementations are in progress:
* TG1 is working on the reference implementation inSML/NJ and the [http://www.ecmascript.org/download.php work-in-progress] is available.
* Tamarin, an open-source ECMAScript engine, will implement ES4. Mozilla plans to use Tamarin inFirefox 4.
* [http://www.ejscript.org/ Ejscript] is a new implementation aimed at embedded applications and systems.
* [http://www.jangaroo.net/ Jangaroo] is a compiler from an ECMAScript 4 subset to ECMAScript 3 implemented in Java.
* [http://ecmascript4.com/ Mascara] is a compiler from an ECMAScript 4 subset to ECMAScript 3 implemented in Python.
* According to Brendan Eich, there are several other "industry-scale implementations underway". [ [https://mail.mozilla.org/pipermail/es-discuss/2007-October/001258.html es4-discuss: is ES4 getting too bloated?] ]History
Work started on Edition 4 after the ES-CP (Compact Profile) specification was completed, and continued for approximately 18 months where slow progress was made balancing the theory of Netscape's JavaScript 2 specification with the implementation experience of Microsoft's JScript .NET. After some time, the focus shifted to the E4X standard.
The update is not without controversy. In late 2007, a debate between Eich, now the
Mozilla Foundation 's CTO, and Chris Wilson,Microsoft 's platform architect forInternet Explorer , became public on a number ofblog s. Wilson cautioned that because the proposed changes to ECMAScript made it backwards incompatible in some respects to earlier versions of the language, the update amounted to "breaking the Web," [ [http://blogs.msdn.com/ie/archive/2007/10/30/ecmascript-3-and-beyond.aspx#5788577 IEBlog: ECMAScript 3 and Beyond] ] and that stakeholders who opposed the changes were being "hidden from view". [ [http://blogs.msdn.com/cwilso/archive/2007/10/31/what-i-think-about-es4.aspx Albatross!: What I think about ES4] ] Eich responded by stating that Wilson seemed to be "repeating falsehoods in blogs" and denied that there was attempt to suppress dissent and challenging critics to give specific examples of incompatibility. [ [http://weblogs.mozillazine.org/roadmap/archives/2007/10/open_letter_to_chris_wilson.html Brendan's Roadmap Updates: Open letter to Chris Wilson] ] He also pointed out thatMicrosoft Silverlight andAdobe AIR rely on C# andActionScript 3 respectively, both of which are larger and more complex than ECMAScript Edition 3. [ [http://weblogs.mozillazine.org/roadmap/archives/2007/11/my_media_ajax_keynote.html Brendan's Roadmap Updates: My @media Ajax Keynote] ]ECMAScript 3.1
Microsoft, Yahoo, and other 4th edition dissenters formed their own subcommittee to design a less ambitious update of ECMAScript 3, tentatively named ECMAScript 3.1. This edition would focus on security and library updates with a large emphasis on compatibility. After the aforementioned public sparring, the ECMAScript 3.1 and ECMAScript 4 teams agreed to a compromise: the two editions would be worked on in parallel, with coordination between the teams to ensure that ECMAScript 3.1 remains a strict subset of ECMAScript 4 in both semantics and syntax.
However, the differing philosophies in each team resulted in repeated breakages of the subset rule, and it remained doubtful that the ECMAScript 4 dissenters would ever support or implement ECMAScript 4 in the future. After over a year since the disagreement over the future of ECMAScript within the ECMA Technical Committee 39, the two teams reached a compromise: ECMA TC39 announced it would focus work on the ECMAScript 3.1 project with full collaboration of all parties, and it would target two interoperable implementations by early 2009. [ [https://mail.mozilla.org/pipermail/es-discuss/2008-August/003400.html ECMAScript Harmony announcement] ]
ECMAScript Harmony
In the same announcement, ECMA TC39 also stated that the ECMAScript 4 proposal would be superseded by a new project, code-named ECMAScript Harmony. ECMAScript Harmony will include syntactic extensions, but the changes will be more modest than ECMAScript 4 in both semantic and syntactic innovation. Packages, namespaces and early binding from ECMAScript 4 are no longer included for planned releases. In addition, other goals and ideas from ECMAScript 4 are being rephrased to keep consensus in the committee; these include a notion of classes based on existing ECMAScript 3 concepts combined with proposed ECMAScript 3.1 extensions. [ [http://ejohn.org/blog/ecmascript-harmony/ John Resig: ECMAScript Harmony] ] As of
August 2008 , there is no publicly announced release date for ECMAScript Harmony. Depending on how ECMASript 3.1 is officially named, ECMAScript Harmony may end up being the new ECMAScript 4th edition.ee also
*
E4X
*List of ECMAScript engines
*Comparison of layout engines (ECMAScript)
*Document Object Model
*JavaScript
*ActionScript References
External links
* [http://www.ecmascript-lang.org/ ECMAScript 4 Reference Implementation]
* [http://www.ecma-international.org/publications/standards/Ecma-262.htm Standard ECMA-262 ECMAScript Language Specification 3rd edition (December 1999)]
* [http://www.ecma-international.org/publications/standards/Ecma-290.htm Standard ECMA-290 ECMAScript Components Specification (June 1999)]
* [http://www.ecma-international.org/publications/standards/Ecma-327.htm Standard ECMA-327 ECMAScript 3rd Edition Compact Profile (June 2001)]
* [http://www.ecma-international.org/publications/standards/Ecma-357.htm Standard ECMA-357 ECMAScript for XML (E4X) Specification (June 2004)]
* [http://wiki.ecmascript.org Export Root of the ECMAScript 4 Committee Wiki]
* [http://ejohn.org/blog/the-world-of-ecmascript The World of ECMAScript] : John Resig's map on ECMAScript
Wikimedia Foundation. 2010.