The reason JavaScript exists is that it was targeting hobbyists and non-programmers for whom Java would have been too much of a barrier to entry. That's why it's called that and why it was referred to as a "companion language" to Java at the time. Remember, Java applets were supposed to be how you build Rich Internet Applications. I recommend reading the "prehistory" chapters of this book: https://dl.acm.org/doi/pdf/10.1145/3386327
JavaScript: the first 20 years
Allen Wirfs-Brock, Brendan Eich
2020 · Proceedings of the ACM on Programming Languages
- HN score
- 1
- Mentions
- 9
- Readers
- 7
- Months
- 7
From the abstract
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.
Metadata: Crossref. Abstracts retain their original authors’ rights.
In the conversation
Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels
9 selected excerpts · 9 total mentions
Found it! Wirfs-Brock & Eich, “JavaScript: the first 20 years” (HOPL ’20) [1], §3.1: > The syntax of JavaScript 1.0 was directly modeled after the statement syntax of the C programming language with some AWK inspired embellishments. (the rest of the section is also interesting in that respect). [1] https://dl.acm.org/doi/10.1145/3386327 (CC-BY open access)
Scheme, in particular. > In early 1995, Brendan Eich was recruited to Netscape with the bait of "come and do Scheme in the browser." https://dl.acm.org/doi/10.1145/3386327 - open access
I've co-authored a HOPL IV paper and given lots of talks, do some searches and you will find them (https://dl.acm.org/doi/pdf/10.1145/3386327). There's no doubt about this. I knew of Self and liked it but did not have time for multiple parent* slots. I didn't even have time to expose the unstratified (meta- in base-level) __proto__ property until 1997 in SpiderMonkey. I was aiming at Self + Scheme-ish (definitely "ish") first class functions because I had to interop with Java.
He says: "And it's really funny because JavaScript is essentially Java with the type declarations removed." That's pretty glib and I think not very informative. For more information you can read Sections 2 and 3 of this http://dx.doi.org/10.1145/3386327
Oh cool! "JavaScript: The first 20 years" looks like pretty deep internet lore; perhaps I'll finally find out what happened to ES4. https://dl.acm.org/doi/pdf/10.1145/3386327
Reading "JavaScript: the first 20 years" [1], Dave Hermans name is popping up here and there as well. His contribution in this case was highlighted in the story of the (failed) ES4. I wonder how these early experience has shaped his thoughts on Rust. [1] https://dl.acm.org/doi/10.1145/3386327
https://dl.acm.org/doi/pdf/10.1145/3386327 For the story from Allen Wirfs-Brock and Brendan Eich. Section 2.1, starting on page 7, talks about the portion of JS history where Eich was hired to build a Scheme in a browser and continues with why it changed and how.
There seems to be some confusion in the comments. The language is called JavaScript. It was temporarily called other things including LiveScript during early development. It was developed at Netscape to be the scripting language for Netscape's browser and server (yes, you read that right). It was also the basis for a proposed competitor to CSS called JavaScript Style Sheets only ever supported by Netscape 4. The trademark to the name was held by Sun prior to its acquisition by Oracle. The existence of the trademark led to Microsoft calling their reverse engineered implementation of the language "JScript". In order to avoid fragmentation via incompatible implementations…
Read the full comment
Netscape published an official language spec with ECMA, an international standards organization similar to ISO. Because the specification could not use the trademarked name this led to the name "ECMAScript" which the official specifications have used ever since. ECMAScript 3 is also the basis for ActionScript 2 used in Flash by Macromedia/Adobe, which is not fully compatible with JavaScript. ActionScript 3 was heavily influenced by the proposed ECMAScript 4, which was eventually scrapped because it tried to do too many things at once (while also intentionally being backwars-incompatible) and none of the companies involved at that point could agree on anything. This led to the heavily downscaled ECMAScript 5 release as a compromise until 2005 when ECMAScript 6 started the current model of yearly releases by defining a multi-stage process for new language features. The obvious question is why it was called JavaScript to begin with. Again, there are many wrong answers in the comments. The generally accepted history is that Sun and Netscape wanted to cooperate to bring Java into Netscape as the new universal language for applications. Java was already going to be available for cross-platform desktop applications (and later for embedded applications like on feature phones) and Java applets were supposed to bring it to the browser. According to various people involved at the time, Netscape's own scripting language was considered a problem by Sun so in order to avoid competing with Java, JavaScript received its final name in order to be rebranded as a "light-weight scripting language" alongside the "serious application development language" of Java. It's also worth mentioning that JavaScript in the browser not only consists of the ECMAScript spec but also the DOM APIs, which were originally written in a language agnostic way because there was no consensus for what the default language for accessing these APIs would be. In addition to JavaScript and JScript, Microsoft also pushed VBScript (based on Visual Basic) and there were some attempts to let Java access the DOM APIs from within the JVM. With Java applets being mostly dead and JavaScript having survived all other browser scripting languages, DOM spec writers have recently moved to considering JavaScript as the primary implementation language and mapping their implementation agnostic pseudo-language to JavaScript language features explicitly. This should hopefully reduce the number of language quirks in future web APIs (like the various native "list" types that don't quite behave like JavaScript arrays or `document.all` being falsey). So in short, JavaScript is called Java so not to compete with Java for "serious browser applications" in the 1990s and ECMAScript is originally a subset of Netscape's (and later Mozilla's) JavaScript although JavaScript has since shrunk and ECMAScript expanded (e.g. JS's `let` and `const` outside strict mode have been superceded by ECMAScript's more recent `let` and `const` in strict mode) to the point that both terms are used interchangeably regardless of the runtime environment. If you're wondering why Netscape went with ECMA of all places instead of something more obvious: neither the IETF nor W3C wanted to get involved in programming language specifications at the time and the ISO process took too long but there was a way to fast-track ECMA standards to ISO standards. Remember that this all happened during the peak of the browser war between Netscape and Microsoft, so this was the only thing that mattered at the time. If you want to learn more about the early history of JavaScript I'd suggest reading Brendan Eich's written history of it: https://dl.acm.org/doi/10.1145/3386327
Keep following the thread.
More in Programming languagesMore from the same topics.
Copy-and-Patch Compilation: A fast compilation algorithm for high-level languages and bytecode
Haoran Xu, Fredrik Kjolstad
Fast compilation is important when compilation occurs at runtime, such as query compilers in modern database systems and WebAssembly virtual machines in modern browsers.
Spectre is here to stay: An analysis of side-channels and speculative execution
Ross Mcilroy, Jaroslav Sevcik, Tobias Tebbi +2
The recent discovery of the Spectre and Meltdown attacks represents a watershed moment not just for the field of Computer Security, but also of Programming Languages.
The evolution of Smalltalk: from Smalltalk-72 through Squeak
Daniel Ingalls
This paper presents a personal view of the evolution of six generations of Smalltalk in which the author played a part, starting with Smalltalk-72 and progressing through Smalltalk-80 to Squeak and Etoys.
Structured Programming with go to Statements
Donald E. Knuth