Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ECMAScript

From Wikipedia, the free encyclopedia
Specification for Javascript and other programming languages
ECMAScript
ParadigmMulti-paradigm:prototype-based,functional,imperative
Designed byBrendan Eich,Ecma International
First appeared1997; 28 years ago (1997)
Typing disciplineweak,dynamic
Websitewww.ecma-international.org/publications-and-standards/standards/ecma-262/
Majorimplementations
JavaScript,ActionScript,JScript,QtScript, InScript,Google Apps Script
Influenced by
Self,HyperTalk,AWK,C,CoffeeScript,Perl,Python,Java,Scheme
ECMAScript (file format)
Filename extensions
.es
Internet media type
application/ecmascript
Developed bySun Microsystems,
Ecma International
Initial releaseJune 1997; 28 years ago (1997-06)
Latest release
Edition 15
June 2024; 1 year ago (2024-06)
Type of formatScripting language
WebsiteStandards

ECMAScript (/ˈɛkməskrɪpt/;ES)[1] is a standard for scripting languages, includingJavaScript,JScript, andActionScript. It is best known as a JavaScript standard intended to ensure theinteroperability ofweb pages across differentweb browsers.[2] It is standardized byEcma International in the documentECMA-262.

ECMAScript is commonly used forclient-side scripting on theWorld Wide Web, and it is increasingly being used for server-side applications and services using runtime environments such asNode.js,[3]Deno[4] andBun.[5]

ECMAScript, ECMA-262, JavaScript

[edit]

ECMA-262, or theECMAScript Language Specification, defines theECMAScript Language, or justECMAScript.[6] ECMA-262 specifies only language syntax and the semantics of the core application programming interface (API), such asArray,Function, andglobalThis, while valid implementations of JavaScript add their own functionality such asinput/output andfile system handling.

History

[edit]

The ECMAScript specification is a standardized specification of a scripting language developed byBrendan Eich ofNetscape; initially named Mocha, then LiveScript, and finally JavaScript.[7] In December 1995,Sun Microsystems and Netscape announced JavaScript in a press release.[8] In November 1996, Netscape announced a meeting of theEcma International standards organization to advance the standardization of JavaScript.[9] The first edition of ECMA-262 was adopted by the Ecma General Assembly in June 1997. Several editions of the language standard have been published since then. The name "ECMAScript" was a compromise between the organizations involved in standardizing the language, especially Netscape and Microsoft, whose disputes dominated the early standards sessions. Eich commented that "ECMAScript was always an unwanted trade name that sounds like askin disease."[10] ECMAScript has been formalized through operational semantics by work atStanford University and theDepartment of Computing,Imperial College London for security analysis and standardization.[11]"ECMA" stood for "European Computer Manufacturers Association" until 1994.

Evolution

[edit]
Main article:ECMAScript version history

Ecma's Technical Committee 39 (TC39) is responsible for the maintenance of ECMAScript.[12] New proposals to the language go through a staged process, with each stage representing the completeness of the proposal's specification. Consensus must be reached within the committee to advance a proposal to the next stage. Proposals that reach stage 4, the final stage, will be included into the next version of the standard.[13] Since the release of version 6 in June 2015, new major versions have been finalized and published every June.[14]

Features

[edit]
[icon]
This sectionneeds expansion. You can help byadding to it.(February 2017)
Main articles:ECMAScript syntax andJavaScript § Features

The ECMAScript language includesstructured,dynamic,functional, andprototype-based features.[15]

Imperative and structured

[edit]

ECMAScript JavaScript supportsC-style structured programming. Previously, JavaScript only supportedfunction scoping using the keywordvar, but ECMAScript 2015 added the keywordslet andconst, allowing JavaScript to support both block scoping and function scoping. JavaScript supportsautomatic semicolon insertion, meaning that semicolons that normally terminate a statement in C may be omitted in JavaScript.[16]

Like C-style languages,control flow is done with thewhile,for,do /while,if /else, andswitch statements. Functions are weakly typed and may accept and return any type. Arguments not provided default toundefined.

Weakly typed

[edit]

ECMAScript isweakly typed. This means that certain types are assigned implicitly based on the operation being performed. However, there are several quirks in JavaScript's implementation of the conversion of a variable from one type to another. These quirks have been the subject of a talk entitledWat.[17][18]

Dynamic

[edit]

ECMAScript is dynamically typed. Thus, a type is associated with a value rather than an expression. ECMAScript supports various ways to test the type of objects, includingduck typing.[19]

Transpiling

[edit]
Main article:JavaScript § transpilers

Since ES 2015, transpiling JavaScript has become very common. Transpilation is asource-to-source compilation in which newer versions of JavaScript are used, and a transpiler rewrites the source code so that it is supported by older browsers. Usually, transpilers transpile down to ES3 to maintain compatibility with all versions of browsers. The settings to transpile to a specific version can be configured according to need. Transpiling adds an extra step to the build process and is sometimes done to avoid needingpolyfills. Polyfills create new features for older environments that lack them. Polyfills do this at runtime in the interpreter, such as the user's browser or on the server. Instead, transpiling rewrites the ECMA code itself during the build phase of development before it reaches the interpreter.

Conformance

[edit]

In 2010, Ecma International started developing a standards test for Ecma 262 ECMAScript.[20]Test262 is an ECMAScript conformance test suite that can be used to check how closely a JavaScript implementation follows the ECMAScript Specification. The test suite contains thousands of individual tests, each of which tests some specific requirement(s) of the ECMAScript specification. The development of Test262 is a project of the Ecma Technical Committee 39 (TC39). The testing framework and the individual tests are contributed to Ecma by member organizations of TC39.

Important contributions were made by Google (Sputnik test suite) and Microsoft, who both contributed thousands of tests.The Test262 test suite consisted of38014 tests as of January 2020[update].[21] ECMAScript specifications through ES7 are well-supported in majorweb browsers. The table below shows the conformance rate for current versions of software with respect to the most recent editions of ECMAScript.

Scripting engine conformance
Scripting engineReference application(s)Conformance[22]
ES5[23]ES6 (2015)[24]ES2016+[25]Next[26][27]
SpiderMonkeyFirefox 120100%98%98%5%
V8Google Chrome 117,Microsoft Edge 113,Opera 98100%98%98%5%
JavaScriptCoreSafari 1799%100%98%11%

See also

[edit]

References

[edit]
  1. ^Stefanov, Stoyan (2010).JavaScript Patterns. O'Reilly Media, Inc. p. 5.ISBN 9781449396947.Archived from the original on 2016-06-10. Retrieved2016-01-12.The core JavaScript programming language [...] is based on theECMAScript standard, or ES for short.
  2. ^Wirfs-Brock, Allen; Eich, Brendan (2020-05-02)."#".Proceedings of the ACM on Programming Languages.4 (HOPL):1–189.doi:10.1145/3386327.S2CID 219603695.
  3. ^Wunder, C."Node.js — ECMAScript 2015 (ES6) and beyond".Node.js.
  4. ^"Deno joins JavaScript standards effort". 14 December 2021.
  5. ^https://bun.sh/docs#:~:text=or%2C%20more%20formally%2C-,ECMAScript,-)%20is%20just%20a bun
  6. ^Guo, Shu-yu (2022-02-14)."ECMAScriptÂŽ 2022 Language Specification".tc39.es.Archived from the original on 2020-05-08. Retrieved2022-02-14.
  7. ^Krill, Paul (2008-06-23)."JavaScript creator ponders past, future".infoworld.com. InfoWorld.Archived from the original on 2014-09-20. Retrieved2013-10-31.
  8. ^"Netscape and Sun announce JavaScript, the Open, Cross-platform Object Scripting Language for Enterprise Networks and the Internet".Netscape.com. Netscape. 1995-12-04. Archived fromthe original on 2002-06-06. Retrieved2019-11-04.
  9. ^Press Release (November 15, 1996)."Industry Leaders to Advance Standardization of Netscape's JavaScript at Standards Body Meeting".Netscape.com. Netscape. Archived fromthe original on 1998-12-03. Retrieved2013-10-31.
  10. ^Eich, Brendan (2006-10-03)."Will there be a suggested file suffix for es4?".mozilla.org. Mail.mozilla.org.Archived from the original on 2020-06-21. Retrieved2021-05-05.
  11. ^Maffeis, Sergio; Mitchell, John C.; Taly, Ankur (2020-01-03)."An Operational Semantics for JavaScript"(PDF).stanford.edu.Association for Computing Machinery.Archived(PDF) from the original on 2020-01-03. Retrieved2020-01-03.
  12. ^"TC39",Technical Committees, Ecma International, retrieved2024-08-11
  13. ^"The TC39 Process",TC39, Ecma International, retrieved2024-08-11
  14. ^"ECMAScript, TC39, and the History of JavaScript",ui.dev, retrieved2024-08-11
  15. ^"About". ECMAScript. Archived fromthe original on 2012-08-02. Retrieved2009-12-17.
  16. ^Flanagan, David (17 August 2006).#"/wiki/ISBN_(identifier)" title="ISBN (identifier)">ISBN 978-0-596-10199-2.
  17. ^Bernhardt, Gary.Wat. CodeMash 2012.Destroy All Software.Archived from the original on 2019-10-28. Retrieved2021-08-18.
  18. ^Gilbertson, Scott (26 January 2012)."Jokes for Nerds: Wat Moments in Programming".Wired.Archived from the original on 23 August 2020. Retrieved22 August 2021.
  19. ^"JavaScript data types and data structures – JavaScript | MDN".Developer.mozilla.org. 2017-02-16.Archived from the original on 2017-03-14. Retrieved2017-02-24.
  20. ^"ECMAScript Language – test262". Test262.ecmascript.org. Archived fromthe original on 2011-05-14. Retrieved2013-10-31.
  21. ^"tc39/test262".GitHub. January 24, 2020.Archived from the original on October 1, 2019. RetrievedJanuary 29, 2020.
  22. ^ES5 is the baseline for this test suite. The conformance rate for other editions reflects support for new features only, not a comprehensive score.
  23. ^"ECMAScript 5 compatibility table".compat-table.github.io. 2024-04-14.Archived from the original on 2024-01-14. Retrieved2024-04-14.
  24. ^"ECMAScript 6 compatibility table".compat-table.github.io. 2024-04-14.Archived from the original on 2024-04-04. Retrieved2024-04-14.
  25. ^"ECMAScript 2016+ compatibility table".compat-table.github.io. 2024-04-14.Archived from the original on 2024-01-14. Retrieved2024-04-14.
  26. ^"ECMAScript Next compatibility table".compat-table.github.io. 2024-04-14.Archived from the original on 2024-01-14. Retrieved2024-04-14.
  27. ^Composite score that includes new features from ES7 through next edition drafts
Dialects
Engines
(list)
Frameworks
Client-side
Server-side
Multiple
  • Cappuccino
Libraries
People
Other
Standards ofEcma International
Application interfaces
File systems (tape)
File systems (disk)
Graphics
Programming languages
Radio link interfaces
Other
List of Ecma standards (1961 – present)
1–9999
10000–19999
20000–29999
30000+
IEC
ISO/IEC
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=ECMAScript&oldid=1297042023"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp