Skip to content

Commit c799c90

Browse files
committed
fact-checking with brendan eich
1 parent 6b4a112 commit c799c90

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

chapters/ch01.asciidoc

+15-13
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,41 @@ How did JavaScript get here, and where is it going next?
77

88
=== 1.1 A Brief History of JavaScript Standards
99

10-
Back in 1995, Netscape envisioned a dynamic web beyond what HTML could offer. Brendan Eich was initially brought into Netscape to develop a language that was functionally akin to Scheme, but for the browser, and upper management also wanted it to look like Java.
10+
Back in 1995, Netscape envisioned a dynamic web beyond what HTML could offer. Brendan Eich was initially brought into Netscape to develop a language that was functionally akin to Scheme, but for the browser. Once he joined, he learned that upper management wanted it to look like Java and a deal to that effect was already underway.
1111

12-
Brendan created the first JavaScript prototype in ten days, taking Scheme's first-class functions and Self's prototypes as its main ingredients. The initial version of JavaScript was code-named Mocha. It didn't have array or object literals, and every error resulted in an alert. Brendan's work on DOM level 0 and the first edition of JavaScript set the stage for standards work.
12+
Brendan created the first JavaScript prototype in ten days, taking Scheme's first-class functions and Self's prototypes as its main ingredients. The initial version of JavaScript was code-named Mocha. It didn't have array or object literals, and every error resulted in an alert. The lack of exception handling is why, to this day, many operations result in +NaN+ or +undefined+. Brendan's work on DOM level 0 and the first edition of JavaScript set the stage for standards work.
1313

14-
This revision of JavaScript was marketed as LiveScript when it started shipping with a beta release of Netscape Navigator 2.0, in September 1995. It was rebranded as JavaScript when Navigator 2.0 beta 3 was released in December 1995. Soon after this release, Netscape introduced a server-side JavaScript implementation for scripting in Netscape Enterprise Server, and named it LiveWirefootnote:[A booklet from 1998 explains the intricacies of Server-Side JavaScript with LiveWire: https://mjavascript.com/out/serverside.]. JScript, Microsoft's reverse-engineered implementation of JavaScript, was bundled with IE3 in 1996. JScript was available for Internet Information Server (IIS) in the server-side.
14+
This revision of JavaScript was marketed as LiveScript when it started shipping with a beta release of Netscape Navigator 2.0, in September 1995. It was rebranded as JavaScript (trademarked by Sun, now owned by Oracle) when Navigator 2.0 beta 3 was released in December 1995. Soon after this release, Netscape introduced a server-side JavaScript implementation for scripting in Netscape Enterprise Server, and named it LiveWirefootnote:[A booklet from 1998 explains the intricacies of Server-Side JavaScript with LiveWire: https://mjavascript.com/out/serverside.]. JScript, Microsoft's reverse-engineered implementation of JavaScript, was bundled with IE3 in 1996. JScript was available for Internet Information Server (IIS) in the server-side.
1515

16-
The language started being standardized under the ECMAScript name (ES) into the ECMA-262 specification in 1996, under a technical commitee at ECMA known as TC39. The dispute by competing implementations, JavaScript by Netscape and JScript by Microsoft, dominated the TC39 standards commitee meetings at the time and "ECMAScript" was a compromise between both their names.
16+
The language started being standardized under the ECMAScript name (ES) into the ECMA-262 specification in 1996, under a technical commitee at ECMA known as TC39. Sun wouldn't transfer ownership of the JavaScript trademark to ECMA, and while Microsoft offered JScript, other member companies didn't want to use that name, so ECMAScript stuck.
1717

18-
The first edition of ECMA-262 was released June, 1997. A year later, in June 1998, the specification was tuned to adhere to the ISO/IEC 16262 international standard and formalized as the second edition.
18+
Disputes by competing implementations, JavaScript by Netscape and JScript by Microsoft, dominated most of the TC39 standards commitee meetings at the time. Even so, the committee was already bearing fruit: backward compatibility was established as a golden rule, bringing about strict equality operators (+===+ and +!==+) instead of breaking existing programs that relied on the loose equality compasion algorithm.
1919

20-
By December 1999 the third edition was published, introducing regular expressions, the +switch+ statement, +do+/+while+, +try+/+catch+ and +Object#hasOwnProperty+, among a few other changes.
20+
The first edition of ECMA-262 was released June, 1997. A year later, in June 1998, the specification was refined under the ISO/IEC 16262 international standard, after much scrutiny from national ISO bodies, and formalized as the second edition.
2121

22-
Drafts for an ES4 specification were soon afterwards published by TC39. This early work on ES4 led to JScript in mid 2000 and, eventually, to ActionScript 3 for Flash in 2006footnote:[Listen to Brendan Eich in the JavaScript Jabber podcast, talking about the origin of JavaScript: https://mjavascript.com/out/brendan-devchat.].
22+
By December 1999 the third edition was published, standardizing regular expressions, the +switch+ statement, +do+/+while+, +try+/+catch+ and +Object#hasOwnProperty+, among a few other changes. Most of these features were already available in the wild through Netscape's JavaScript runtime, SpiderMonkey.
23+
24+
Drafts for an ES4 specification were soon afterwards published by TC39. This early work on ES4 led to JScript​.NET in mid-2000footnote:[You can read the original announcement here: https://mjavascript.com/out/jscript-net (July, 2000).] and, eventually, to ActionScript 3 for Flash in 2006footnote:[Listen to Brendan Eich in the JavaScript Jabber podcast, talking about the origin of JavaScript: https://mjavascript.com/out/brendan-devchat.].
2325

2426
Conflicting opinions on how JavaScript was to move forward brought work on the specification to a standstill. This was a delicate time for web standards: Microsoft had all but monopolized the web and they had little interest in standards development.
2527

2628
As AOL laid off 50 Netscape employees in 2003footnote:[You can read a news report from July 2003 at: https://mjavascript.com/out/aol-netscape.], the Mozilla Foundation was formed. With over 95% of web browsing market share now in the hands of Microsoft, TC39 was disbanded.
2729

2830
It took two years until Brendan, now at Mozilla, had ECMA resurrect work on TC39 by using Firefox's growing market share as leverage to get Microsoft back in the fold. By mid 2005, TC39 started meeting regularly once again. As for ES4, there were plans for introducing a module system, classes, iterators, generators, destructuring, type annotations, proper tail calls, algebraic typing, and an assortment of other features. Due to how ambitious the project was, work on ES4 was repeatedly delayed.
2931

30-
By 2007 the commitee was split in two: ES3.1, which hailed a more incremental approach to ES3; and ES4, which was overdesigned and underspecified. It wouldn't be until August 2008footnote:[Brendan Eich sent an email to the es-discuss mailing list in 2008 where he summarized the situation, almost ten years after ES3 had been released: https://mjavascript.com/out/harmony.] when ES3.1 was agreed upon as the way forward, but later rebranded as ES5. Although ES4 would be abandoned, many of its features eventually made its way into ES6, and some of them still remain under consideration. The ES3.1 update served as the foundation on top of which the ES4 specification could be laid upon in bits and pieces.
32+
By 2007 the commitee was split in two: ES3.1, which hailed a more incremental approach to ES3; and ES4, which was overdesigned and underspecified. It wouldn't be until August 2008footnote:[Brendan Eich sent an email to the es-discuss mailing list in 2008 where he summarized the situation, almost ten years after ES3 had been released: https://mjavascript.com/out/harmony.] when ES3.1 was agreed upon as the way forward, but later rebranded as ES5. Although ES4 would be abandoned, many of its features eventually made its way into ES6 (which was dubbed Harmony at the time of this resolution), while some of them still remain under consideration. The ES3.1 update served as the foundation on top of which the ES4 specification could be laid upon in bits and pieces.
3133

32-
In December 2009, on the ten-year anniversary since the publication of ES3, the fifth edition of ECMAScript was published. This edition codified de facto interpretations of the language specification that had become common among browser implementations, adding get and set accessors, reflection and introspection, functional improvements to the +Array+ prototype, native support for JSON parsing, and strict mode.
34+
In December 2009, on the ten-year anniversary since the publication of ES3, the fifth edition of ECMAScript was published. This edition codified de facto extensions to the language specification that had become common among browser implementations, adding get and set accessors, reflection and introspection, functional improvements to the +Array+ prototype, native support for JSON parsing, and strict mode.
3335

34-
A couple of years later, in June 2011, the specification was once again aligned with the third edition of the international standard ISO/IEC 16262:2011, and formalized under ECMAScript 5.1.
36+
A couple of years later, in June 2011, the specification was once again reviewed and edited to become the third edition of the international standard ISO/IEC 16262:2011, and formalized under ECMAScript 5.1.
3537

36-
It took TC39 another four years to formalize ECMAScript 6, in June 2015. Starting with ES6, revisions are also known by their release year: ES6 is also known as ES2015, ES7 is also referred to as ES2016, and so on. The sixth edition is the largest update to the language that made its way into publication, implementing many of the proposals that were abandoned after the power struggle between ES3.1 and ES4. Throughout this book, we'll be exploring ES6 in depth.
38+
It took TC39 another four years to formalize ECMAScript 6, in June 2015. Starting with ES6, revisions are also known by their release year: ES6 is also known as ES2015, ES7 is also referred to as ES2016, and so on. The sixth edition is the largest update to the language that made its way into publication, implementing many of the ES4 proposals that were deferred as part of the Harmony resolution. Throughout this book, we'll be exploring ES6 in depth.
3739

3840
The sixth edition is a significant milestone in the history of JavaScript. Besides the dozens of new features, ES6 marks a key inflection point where ECMAScript would become a rolling standard.
3941

4042
=== 1.2 ECMAScript as a Rolling Standard
4143

42-
Having spent ten years without observing significant change to the language specification after ES3, and four years for ES6 to materialize, it was clear the TC39 process needed to improve. The revision process used to be date-driven. Any delay in arriving at consensus would cause long wait periods between revisions, which lead to feature creep, causing more delays. Minor revisions were delayed by large additions to the specification, and large additions faced pressure to finalize so that the revision would be pushed through avoiding further delays.
44+
Having spent ten years without observing significant change to the language specification after ES3, and four years for ES6 to materialize, it was clear the TC39 process needed to improve. The revision process used to be deadline-driven. Any delay in arriving at consensus would cause long wait periods between revisions, which lead to feature creep, causing more delays. Minor revisions were delayed by large additions to the specification, and large additions faced pressure to finalize so that the revision would be pushed through avoiding further delays.
4345

4446
Since ES6 came out, TC39 has streamlinedfootnote:[You can find the September 2013 presentation which lead to the streamlined proposal revisioning process here: https://mjavascript.com/out/tc39-improvement.] its proposal revisioning process and adjusted it to meet modern expectations: the need to iterate more often and consistently, and to democratize specification development. At this point, TC39 moved from an ancient Word-based flow to using Ecmarkup and GitHub Pull Requests, greatly increasing the number of proposalsfootnote:[You can find all proposals being considered by TC39 at https://mjavascript.com/out/tc39-proposals.] being created as well as external participation by non-members.
4547

@@ -57,7 +59,7 @@ Proposals in stage 3 are candidate recommendations. At this point, implementors
5759

5860
In order for a proposal to attain stage 4 status, two independent implementations need to pass conformance tests. Proposals that make their way through to stage four will be included in the next revision of ECMAScript.
5961

60-
Starting with ES6, new releases of the specification are expected to be published every year from now on. To accomodate the yearly release schedule, versions will now be referred to by their publication year. Thus ES6 becomes ES2015, ES7 is ES2016, and so on. Colloquially, ES2015 hasn't taken and is still largely regarded as ES6. ES7 had been announced before the naming convention changed, thus it is only sometimes referred to as ES2016.
62+
Starting with ES6, new releases of the specification are expected to be published every year from now on. To accommodate the yearly release schedule, versions will now be referred to by their publication year. Thus ES6 becomes ES2015, ES7 is ES2016, and so on. Colloquially, ES2015 hasn't taken and is still largely regarded as ES6. ES7 had been announced before the naming convention changed, thus it is only sometimes referred to as ES2016.
6163

6264
It may be expected that, going forward, ES2017 and beyond aren't referenced by the old naming convention anymore. The streamlined proposal process combined with the yearly cut into standardization translates into a more consistent publication process, and it also means specification revision numbers are becoming less important. The focus is now on proposal stagesfootnote:[For a full list of currently active proposals in the multi-staged TC39 process, see https://mjavascript.com/out/tc39-proposals.], and we can expect references to specific revisions of the ECMAScript standard to become more uncommon.
6365

chapters/ch04.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ for (let value of random) {
653653

654654
It can be hard to understand code like that when reading it later, as a lot of the code is focused on how the sequence is iterated, printing values from +random+ until one value is large enough; and not on what the sequence looks like, the first N values until a larger value is found. Abstracting away part of the logic into another method might make the code more readable.
655655

656-
As another example, a common pattern when extracting values from an infinite or very large sequence is to "take" the first few elements in the sequence. While you could accomodate that use case through +for..of+ and +break+, you'd be better off abstracting it into a +take+ method. The following example shows a potential implementation of +take+. It receives a +sequence+ parameter and the +amount+ of entries you'd like to take from the +sequence+. It returns an iterable object, and whenever that object is iterated it constructs an iterator for the provided +sequence+. The +next+ method defers to the original +sequence+ while the +amount+ is at least +1+, and then ends the sequence.
656+
As another example, a common pattern when extracting values from an infinite or very large sequence is to "take" the first few elements in the sequence. While you could accommodate that use case through +for..of+ and +break+, you'd be better off abstracting it into a +take+ method. The following example shows a potential implementation of +take+. It receives a +sequence+ parameter and the +amount+ of entries you'd like to take from the +sequence+. It returns an iterable object, and whenever that object is iterated it constructs an iterator for the provided +sequence+. The +next+ method defers to the original +sequence+ while the +amount+ is at least +1+, and then ends the sequence.
657657

658658
[source,javascript]
659659
----

0 commit comments

Comments
 (0)