JavaScript. The Core.

Read this article in: German, Russian, French, Polish.

Note: a new 2nd Edition of this article is available.

Note: see also Essentials of Interpretation course, where we build a programming language similar to JavaScript, from scratch.

This note is an overview and summary of the “ECMA-262-3 in detail” series. Every section contains references to the appropriate matching chapters so you can read them to get a deeper understanding. Continue reading

ECMA-262-5 in detail. Chapter 2. Strict Mode.

Introduction

In this chapter we will concentrate on another feature of the ECMA-262-5. The topic of the discussion is a strict variant (or strict mode) of an ECMAScript program. We’ll discuss the reasons for providing this feature, how it affects on some already existing semantic aspects and what can it restrict. Continue reading

ECMA-262-5 in detail. Chapter 1. Properties and Property Descriptors.

Read this article in: Russian.

Introduction

This chapter is devoted generally to one of new concepts of the ECMA-262-5 specification — to property attributes and mechanism of their handling — property descriptors.

Usually saying that “an object has some property” we mean an association between a property name and its value. But as we know from the ES3 analysis, a property structure is more complex than just a string name. It also has set of attributes — those which we already discussed in ES3, e.g. {ReadOnly}, {DontEnum} and other. So from this viewpoint a property is as an object itself. Continue reading

Тонкости ECMA-262-5. Часть 1. Свойства и дескрипторы свойств

Read this article in: English.

Введение

Эта глава посвященна одной из новых концепций в спецификации ECMA-262-5 — атрибутам свойств и механизму работы с ними, дескрипторам свойств.

Обычно, говоря, что объект имеет какие-то свойства, мы имеем ввиду связь между именем свойства и его значением. Но, как мы знаем из анализа ES3, структура свойства несколько сложнее, чем просто строковое имя. Оно также имеет набор атрибутов — те, которые мы уже обсудили в статьях об ES3, например {ReadOnly}, {DontEnum} и другие. С этой точки зрения свойство само по себе является объектом. Continue reading

ECMA-262-5 in detail. Chapter 0. Introduction.

We have finished analysis of the most important parts and theoretical aspects concerning 3rd edition of the ECMA-262 specification, i.e. standard devoted ECMAScript programming language. We have done and achieved a lot. Originally written in Russian, this series after more than half an year has been translated to several languages, what allowed this information to be shared with JavaScript developers and with everyone who interested in deep ECMAScript allover the world. Continue reading

ECMA-262-3 in detail. Chapter 8. Evaluation strategy

Read this article in: Russian, French.

Note: this article was revisited and updated on Feb 10th, 2020

Introduction

In this small note we will consider strategy of passing arguments to functions in ECMAScript.

In general this part of computer science is known as evaluation strategy, that is, a set of rules for evaluating semantics of some expressions. The strategy of passing arguments to functions is one of its cases. Continue reading

ECMA-262-3 in detail. Chapter 5. Functions.

Read this article in: Russian, Chinese (version 1, version 2), French.

Introduction

In this article we will talk about one of the general ECMAScript objects — about functions. In particular, we will go through various types of functions, will define how each type influences variables object of a context and what is contained in the scope chain of each function. Continue reading

ECMA-262-3 in detail. Chapter 4. Scope chain.

Read this article in: Russian, Chinese (version 1, version 2), Korean, French.

Introduction

As we already know from the second chapter concerning the variable object, the data of an execution context (variables, function declarations, and formal parameters of functions) are stored as properties of the variables object. Continue reading

ECMA-262-3 in detail. Chapter 2. Variable object.

Read this article in: Russian, Chinese, French.

Introduction

Always in programs we declare functions and variables which then successfully use building our systems. But how and where the interpreter finds our data (functions, variable)? What occurs, when we reference to needed objects? Continue reading