• Complain

it-ebooks - Exploring ES6

Here you can read online it-ebooks - Exploring ES6 full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2017, publisher: iBooker it-ebooks, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

it-ebooks Exploring ES6
  • Book:
    Exploring ES6
  • Author:
  • Publisher:
    iBooker it-ebooks
  • Genre:
  • Year:
    2017
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Exploring ES6: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Exploring ES6" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

it-ebooks: author's other books


Who wrote Exploring ES6? Find out the surname, the name of the author of the book and a list of all author's works by series.

Exploring ES6 — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Exploring ES6" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Exploring ES6

Author: Dr. Axel Rauschmayer

From: Exploring ES6

Short TOC
Next:
What you need to know about this book

This book is about ECMAScript 6 (whose official name is ECMAScript 2015), a new version of JavaScript.

Audience: JavaScript programmers

In order to understand this book, you should already know JavaScript. If you dont: my other book Speaking JavaScript is free online and teaches programmers all of JavaScript (up to and including ECMAScript 5).

Why should I read this book?
  • You decide how deep to go: This book covers ECMAScript 6 in depth, but is structured so that you can also quickly get an overview if you want to.
  • Not just what, also why: This book not only tells you how ES6 works, it also tells you why it works the way it does.
  • Thoroughly researched: In order to make sense of ES6, I have consulted many sources:
    • The language specification (to which youll occasionally find pointers in this book)
    • The es-discuss mailing list
    • The TC39 meeting notes
    • Scientific papers
    • Documentation on features in other languages that inspired ES6 features
    • And more
How to read this book

This book covers ES6 with three levels of detail:

  • Quick start: Begin with the chapter collects all of these overview sections in a single location.
  • Solid foundation: Each chapter always starts with the essentials and then increasingly goes into details. The headings should give you a good idea of when to stop reading, but I also occasionally give tips in sidebars w.r.t. how important it is to know something.
  • In-depth knowledge: Read all of a chapter, including the in-depth parts.

Other things to know:

  • Recommendations: I occasionally recommend simple rules. Those are meant as guidelines, to keep you safe without you having to know (or remember) all of the details. I tend to favor mainstream over elegance, because most code doesnt exist in a vacuum. However, Ill always give you enough information so that you can make up your own mind.
  • Forum: The Exploring ES6 homepage links to a forum where you can discuss questions and ideas related to this book.
  • Errata (typos, errors, etc.): On the Exploring ES6 homepage, there are links to a form for submitting errata and to a list with submitted errata.
Sources of this book

I started writing this book long before there were implementations of ES6 features, which required quite a bit of research. Essential sources were:

  • The es-discuss mailing list
  • TC39 meeting notes
  • The ECMAScript language specification
  • The old ECMAScript Harmony wiki
  • Scientific papers (e.g. the ones written about ES6 proxies) and other material on the web.
  • Asking around to fill remaining holes (the people who answered are acknowledged throughout the book)
Glossary
Strict mode versus sloppy mode

ECMAScript 5 introduced language modes: Strict mode makes JavaScript a cleaner language by changing its semantics, performing more checks and throwing more exceptions. Consult Sect. Strict Mode in Speaking JavaScript for more information. The legacy/default mode is called non-strict mode or sloppy mode.

Strict mode is switched on via the following line (which does nothing in ECMAScript versions before ES5):

'use strict';

If you put this line at the beginning of a file, all code in it is in strict mode. If you make this line the first line of a function, only that function is in strict mode.

Using a directive to switch on strict mode is not very user friendly and was one of the reasons why strict mode was not nearly as popular in ES5 as it should be. However, ES6 modules and classes are implicitly in strict mode. Given that most ES6 code will live in modules, strict mode becomes the de-facto default for ES6.

Protocol

The term protocol has various meanings in computing. In the context of programming languages and API design, Im using it as follows:

A protocol defines interfaces (signatures for methods and/or functions) and rules for using them.

The idea is to specify how a service is to be performed. Then anyone can perform the service and anyone can request it and they are guaranteed to work together well.

Note that the definition given here is different from viewing a protocol as an interface (as, for example, Objective C does), because this definition includes rules.

Receiver (of a method call)

Given a method call obj.m(), obj is the receiver of the method call and accessible via this inside the method.

Signature of a function (or a method)

The (type) signature of a function describes how the function is to be called, what its inputs and its output are. Im using the syntax established by Microsoft TypeScript and Facebook Flow in this book. An example of a signature:

parseInt(string:string,radix?:number):number

You can see that parseInt() expects a string and a number and returns a number. If the type of a parameter is clear, I often omit the type annotation.

Internal slots

The ES6 language specification uses internal slots to store internal data. In the spec, internal slots are accessed as if they were properties whose names are in square brackets:

O.[[GetPrototypeOf]]()

Two things differentiate them from properties:

  • They are not read via get operations and written via set operations.
  • They are only known to the spec and not accessible from JavaScript. For example: the link between an object and its prototype is the internal slot [[Prototype]]. The value of that slot cannot be read directly via JavaScript, but you can use Object.getPrototypeOf() to do so.

How exactly internal slots are stored is left unspecified. Some may not even exist in actual JavaScript implementations.

Bindings and environments

The ECMAScript spec uses a data structure called environment to store the variables of a scope. An environment is basically a dictionary that maps variable names to values. A binding is an entry in an environment, storage space for a variable.

Destructive operations

Destructive operations (methods, functions) modify their parameters or their receivers. For example, push() modifies its receiver arr:

> const arr = ['a', 'b'];> arr.push('c')3> arr[ 'a', 'b', 'c' ]

In contrast, concat() creates a new Array and does not change its receiver arr:

> const arr = ['a', 'b'];> arr.concat(['c'])[ 'a', 'b', 'c' ]> arr[ 'a', 'b' ]
Conventions
Documenting classes

The API of a class C is usually documented as follows:

  • C constructor
  • Static C methods
  • C.prototype methods
Capitalization

In English, I capitalize JavaScript terms as follows:

  • The names of primitive entities are not capitalized: a boolean value, a number value, a symbol, a string. One reason why Im doing this is because TypeScript and Flow distinguish:
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Exploring ES6»

Look at similar books to Exploring ES6. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Exploring ES6»

Discussion, reviews of the book Exploring ES6 and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.