Read this article in: English, German.
Данная статья является вторым изданием обзорной лекции JavaScript. Ядро, посвященной языку программирования ECMAScript, и ключевым компонентам его рантайм-системы.
There are 6 posts tagged Closure.
Read this article in: English, German.
Данная статья является вторым изданием обзорной лекции JavaScript. Ядро, посвященной языку программирования ECMAScript, и ключевым компонентам его рантайм-системы.
Read this article in: Russian, German.
This is the second edition of the JavaScript. The Core overview lecture, devoted to ECMAScript programming language and core components of its runtime system.
Note: see also Essentials of Interpretation course, where we build a programming language similar to JavaScript, from scratch.
Read this article in Chinese.
In this chapter we continue our consideration of lexical environments. In the previous sub chapter 3.1 we clarified the general theory related with the topic. In particular we have learned that the concept of environments is closely related with concepts of static scope and closures. Continue reading
In this chapter we’ll talk in detail about lexical environments — a mechanism used in some languages to manage the static scoping. In order to understand this concept completely, we’ll also discuss briefly the alternative — dynamic scoping (which though isn’t used directly in ECMAScript). We’ll see how environments help to manage lexically nested structures of a code and to provide complete support of closures. Continue reading
Read this article in: Russian, French.
In this article we will talk about one of the most discussed topics related to JavaScript — about closures. The topic, as a matter of fact, is not new and was discussed many times. However we will try to discuss and understand it more from a theoretical viewpoint, and also will look at how closures are implemented in ECMAScript.
Continue reading
Read this article in: English, French.
В этой заметке мы поговорим об одной из наиболее обсуждаемых тем, связанных с JavaScript — о замыканиях. Тема, по сути, избита; существует немалое количество статей, посвящённых этой структуре (некоторые из них очень хорошие, например, статья R. Cornford-a, представленная в списке дополнительной литературы), однако мы постараемся разобрать её более с теоретической точки зрения, и посмотрим, как замыкания в ECMAScript устроены изнутри.
Continue reading