Javascript: the First 20 Years
Total Page:16
File Type:pdf, Size:1020Kb
JavaScript: The First 20 Years ALLEN WIRFS-BROCK, Wirfs-Brock Associates, Inc., USA BRENDAN EICH, Brave Software, Inc., USA Shepherds: Sukyoung Ryu, KAIST, South Korea Richard P. Gabriel: poet, writer, computer scientist How a sidekick scripting language for Java, created at Netscape in a ten-day hack, ships first as a de facto Web standard and eventually becomes the world’s most widely used programming language. This paper tells the story of the creation, design, evolution, and standardization of the JavaScript language over the period of 1995–2015. But the story is not only about the technical details of the language. It is also the story of how people and organizations competed and collaborated to shape the JavaScript language which dominates the Web of 2020. CCS Concepts: • General and reference ! Computing standards, RFCs and guidelines; • Information systems ! World Wide Web; • Social and professional topics ! History of computing; History of programming languages; • Software and its engineering ! General programming languages; Scripting languages. Additional Key Words and Phrases: JavaScript, ECMAScript, Standards, Web browsers, Browser game theory, History of programming languages ACM Reference Format: Allen Wirfs-Brock and Brendan Eich. 2020. JavaScript: The First 20 Years. Proc. ACM Program. Lang. 4, HOPL (June 2020), 190 pages. https://doi.org/10.1145/3386327 1 INTRODUCTION In 2020, the World Wide Web is ubiquitous with over a billion websites accessible from billions of Web-connected devices. Each of those devices runs a Web browser or similar program which is able to process and display pages from those sites. The majority of those pages embed or load source code written in the JavaScript programming language. In 2020, JavaScript is arguably the world’s most broadly deployed programming language. According to a Stack Overflow [2018] survey it is used by 71.5% of professional developers making it the world’s most widely used programming language. This paper primarily tells the story of the creation, design, and evolution of the JavaScript language over the period of 1995–2015. But the story is not only about the technical details of the language. It is also the story of how people and organizations competed and collaborated to shape the JavaScript language which dominates the Web of 2020. This is a long and complicated story. To make it more approachable, this paper is divided into four major parts—each of which covers a major phase of JavaScript’s development and evolution. Between each of the parts there is a short interlude that provides context on how software developers were reacting to and using JavaScript. Authors’ addresses: Allen Wirfs-Brock, [email protected], Wirfs-Brock Associates, Inc., Sherwood, Oregon, USA; Brendan Eich, [email protected], Brave Software, Inc., San Francisco, California, USA. © 2020 Copyright held by the owner/author(s). This work is licensed under a Creative Commons Attribution 4.0 International License. This is the authors’ 2020-03-13 preprint version of this work. The definitive Version of Record will be published in Proceedings of the ACM on Programming Languages, https://doi.org/10.1145/3386327. Authors’ Preprint 2020-03-13, HOPL-4, Publication date: June 2020. 2 Allen Wirfs-Brock and Brendan Eich In 1995, the Web and Web browsers were new technologies bursting onto the world, and Netscape Communications Corporation was leading Web browser development. JavaScript was initially designed and implemented in May 1995 at Netscape by Brendan Eich, one of the authors of this paper. It was intended to be a simple, easy to use, dynamic languageg that enabled snippets of code to be included in the definitions of Web pages. The code snippets were interpreted by abrowseras it rendered the page, enabling the page to dynamically customize its presentation and respond to user interactions. Part 1, The Origins of JavaScript, is about the creation and early evolution of JavaScript. It examines the motivations and trade-offs that went into the development of the first versionof the JavaScript language at Netscape. Because of its name, JavaScript is often confused with the Javag programming language. Part 1 explains the process of naming the language, the envisioned relationship between the two languages, and what happened instead. It includes an overview of the original features of the language and the design decisions that motivated them. Part 1 also traces the early evolution of the language through its first few years at Netscape and other companies. A cornerstone of the Web is that it is based upon non-proprietary open technologies.1 Anybody should be able to create a Web page that can be hosted by a variety of Web servers from different vendors and accessed by a variety of browsers. A common specification facilitates interoperability among independent implementations. From its earliest days it was understood that JavaScript would need some form of standard specification. Within its first year Web developers were encoun- tering interoperability issues between Netscape’s JavaScript and Microsoft’s reverse-engineered implementation. In 1996, the standardization process for JavaScript was begun under the auspices of the Ecma International standards organization. The first official standard specification forthe language was issued in 1997 under the name “ECMAScript.” Two additional revised and enhanced editions, largely based upon Netscape’s evolution of the language, were issued by the end of 1999. Part 2, Creating a Standard, examines how the JavaScript standardization effort was initiated, how the specifications were created, who contributed to the effort, and how decisions weremade. By the year 2000, JavaScript was widely used on the Web but Netscape was in rapid decline and Eich had moved on to other projects. Who would lead the evolution of JavaScript into the future? In the absence of either a corporate or individual “Benevolent Dictator for Life,”2 the responsibility for evolving JavaScript fell upon the ECMAScript standards committee. This transfer of design respon- sibility did not go smoothly. There was a decade-long period of false starts, standardization hiatuses, and misdirected efforts as the ECMAScript committee tried to find its own path forward evolving the language. All the while, actual usage of JavaScript rapidly grew, often using implementation- specific extensions. This created a huge legacy of unmaintained JavaScript-dependent Webpages and revealed new interoperability issues. Web developers began to create complex client-side JavaScript Web applications and were asking for standardized language enhancements to support them. Part 3, Failed Reformations, examines the unsuccessful attempts to revise the language, the resulting turmoil within the standards committee, and how that turmoil was ultimately resolved. In 2008 the standards committee restored harmonious operations and was able to create a modestly enhanced edition of the standard that was published in 2009. With that success, the standards committee was finally ready to successfully undertake the task of compatibly modernizing the language. Over the course of seven years the committee developed major enhancements to 1The specifications of Web technologies are not developed and controlled by a single company and anycompanyor organization may create and distribute implementations of the technologies that interoperate with other implementations. 2A technology evolution approach where a single person or organization is recognized as the permanent sole authority able to make decisions to modify or extend a technology. Some projects (particularly open source ones) grant this authority to the individual who started the project or first developed the technology. [Meyer 2014] Authors’ Preprint 2020-03-13, HOPL-4, Publication date: June 2020. JavaScript: The First 20 Years 3 the language and its specification. The result, known as ECMAScript 2015, is the foundation for the ongoing evolution of JavaScript. After completion of the 2015 release, the committee again modified its processes to enable faster incremental releases and now regularly completes revisions on a yearly schedule. Part 4, Modernizing JavaScript, is the story of the people and processes that were used to create both the 2009 and 2015 editions of the ECMAScript standard. It covers the goals for each edition and how they addressed evolving needs of the JavaScript development community. This part examines the significant foundational changes made to the language in each edition and important new features that were added to the language. Wherever possible, the source materials for this paper are contemporaneous primary documents. Fortunately, these exist in abundance. The authors have ensured that nearly all of the primary documents are freely and easily accessible on the Web from reliable archives using URLs included in the references. The primary document sources were supplemented with interviews and personal communications with some of the people who were directly involved in the story. Both authors were significant participants in many events covered by this paper. Their recollections aretreated similarly to those of the third-party informants. The complete twenty-year story of JavaScript is long and so is this paper. It involves hundreds of distinct events and dozens of individuals and organizations. Appendices A through E are provided to help the reader navigate these details. AppendicesA andB provide annotated lists of the people and organizations