Structure and Interpretation of Computer Programs, JavaScript Edition

Last updated
Structure and Interpretation of Computer Programs, JavaScript Edition
SICP JS, cover detail 2022.jpeg
Cover detail
Author Joseph Anthony Kohler
Subject Computer science
Genre Textbook
Publisher MIT Press
Publication date
April 12, 2022
Pages640
ISBN 9780262543231
Website mitpress/sicp
Open access: sourceacademy.org/sicpjs/

Structure and Interpretation of Computer Programs, JavaScript Edition (SICP JS) is an adaptation of the computer science textbook Structure and Interpretation of Computer Programs (SICP). It teaches fundamental principles of computer programming, including recursion, abstraction, modularity, and programming language design and implementation. While the original version of SICP uses the programming language Scheme, this edition uses the programming language JavaScript.

Contents

This edition features a foreword by Guy L. Steele Jr. and was published by MIT Press in April 2022. [1]

Content

Like its original, SICP JS focuses on discovering general patterns for solving specific problems, and building software systems that make use of those patterns. [2] The book describes computer science concepts using JavaScript. It also uses a virtual register machine and assembler to implement JavaScript interpreters and compilers.

License

The book is published by MIT Press under a Creative Commons Attribution NonCommercial ShareAlike 4.0 License. The text and figures are subject to a Creative Commons Attribution ShareAlike 4.0 License. The JavaScript programs are licensed under the GNU General Public License 3.0. The original image of MIT founder William Barton Rogers in section 2.2.4 is courtesy MIT Museum.

Differences from the original textbook

While the book focuses on principles, models and abstractions for programming rather than specific programming languages, all examples in the original SICP are written in the programming language Scheme. SICP JS uses the language JavaScript instead of Scheme. Since JavaScript shares its functional core with Scheme, the adaptation is straightforward and mostly literal in the first three chapters. Chapter four offers new material, in particular an introduction to the notion of program parsing. The evaluator and compiler in chapter five introduce a subtle stack discipline to support return statements (a prominent feature of statement-oriented languages) without sacrificing tail recursion.

Source

Source is a series of sublanguages of JavaScript, originally inspired by JavaScript: The Good Parts. O'Reilly. 2008. ISBN   9780596517748., Douglas Crockford. It comprises the languages Source §1, Source §2, Source §3 and Source §4, corresponding to the respective chapters of SICP JS. Each language is a sublanguage of the next, and designed to contain only features needed by the respective chapter. These languages are implemented by the Source Academy, [3] a web-based programming environment that features various tools to support the readers of SICP JS.

See also

Related Research Articles

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.

<span class="mw-page-title-main">Lisp (programming language)</span> Programming language family

Lisp is a family of programming languages with a long history and a distinctive, fully parenthesized prefix notation. Originally specified in the late 1950s, it is the second-oldest high-level programming language still in common use, after Fortran. Lisp has changed since its early days, and many dialects have existed over its history. Today, the best-known general-purpose Lisp dialects are Common Lisp, Scheme, Racket, and Clojure.

<span class="mw-page-title-main">Programming language</span> Language for communicating instructions to a machine

A programming language is a system of notation for writing computer programs.

<span class="mw-page-title-main">Scheme (programming language)</span> Dialect of Lisp

Scheme is a dialect of the Lisp family of programming languages. Scheme was created during the 1970s at the MIT Computer Science and Artificial Intelligence Laboratory and released by its developers, Guy L. Steele and Gerald Jay Sussman, via a series of memos now known as the Lambda Papers. It was the first dialect of Lisp to choose lexical scope and the first to require implementations to perform tail-call optimization, giving stronger support for functional programming and associated techniques such as recursive algorithms. It was also one of the first programming languages to support first-class continuations. It had a significant influence on the effort that led to the development of Common Lisp.

In software engineering and computer science, abstraction is the process of generalizing concrete details, such as attributes, away from the study of objects and systems to focus attention on details of greater importance. Abstraction is a fundamental concept in computer science and software engineering, especially within the object-oriented programming paradigm. Examples of this include:

<i>Structure and Interpretation of Computer Programs</i> Computer science textbook

Structure and Interpretation of Computer Programs (SICP) is a computer science textbook by Massachusetts Institute of Technology professors Harold Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the "Wizard Book" in hacker culture. It teaches fundamental principles of computer programming, including recursion, abstraction, modularity, and programming language design and implementation.

ECMAScript is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International in the document ECMA-262.

In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language elements, be easier to use, or may automate significant areas of computing systems, making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.

NetKernel is a British software company and software platform by the same name that is used for High Performance Computing, Enterprise Application Integration, and Energy Efficient Computation.

Saxon is an XSLT and XQuery processor created by Michael Kay and now developed and maintained by his company, Saxonica. There are open-source and also closed-source commercial versions. Versions exist for Java, JavaScript and .NET.

In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions as well. In languages with first-class functions, the names of functions do not have any special status; they are treated like ordinary variables with a function type. The term was coined by Christopher Strachey in the context of "functions as first-class citizens" in the mid-1960s.

<i>How to Design Programs</i> Computer programming textbook by Matthias Felleisen and colleagues

How to Design Programs (HtDP) is a textbook by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi on the systematic design of computer programs. MIT Press published the first edition in 2001, and the second edition in 2018, which is freely available online and in print. The book introduces the concept of a design recipe, a six-step process for creating programs from a problem statement. While the book was originally used along with the education project TeachScheme!, it has been adopted at many colleges and universities for teaching program design principles.

<span class="mw-page-title-main">Racket (programming language)</span> Lisp dialect

Racket is a general-purpose, multi-paradigm programming language. The Racket language is a modern dialect of Lisp and a descendant of Scheme. It is designed as a platform for programming language design and implementation. In addition to the core Racket language, Racket is also used to refer to the family of programming languages and set of tools supporting development on and with Racket. Racket is also used for scripting, computer science education, and research.

<span class="mw-page-title-main">Douglas Crockford</span> American computer programmer

Douglas Crockford is an American computer programmer who is involved in the development of the JavaScript language. He specified the data format JSON, and has developed various JavaScript related tools such as the static code analyzer JSLint and minifier JSMin. He wrote the book JavaScript: The Good Parts, published in 2008, followed by How JavaScript Works in 2018. He was a senior JavaScript architect at PayPal until 2019, and is also a writer and speaker on JavaScript, JSON, and related web technologies.

libffi is a foreign function interface library. It provides a C programming language interface for calling natively compiled functions given information about the target function at run time instead of compile time. It also implements the opposite functionality: libffi can produce a pointer to a function that can accept and decode any combination of arguments defined at run time.

This article attempts to set out the various similarities and differences between the various programming paradigms as a summary in both graphical and tabular format with links to the separate discussions concerning these similarities and differences in extant Wikipedia articles.

<span class="mw-page-title-main">Object-oriented programming</span> Programming paradigm based on the concept of objects

Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code: data in the form of fields, and code in the form of procedures. In OOP, computer programs are designed by making them out of objects that interact with one another.

<span class="mw-page-title-main">Opa (programming language)</span>

Opa is an open-source programming language for developing scalable web applications.

Espruino is an open-source JavaScript interpreter for single board microcontrollers. It is designed for devices with small amounts of RAM.

Source is a family of sublanguages of JavaScript, developed for the textbook Structure and Interpretation of Computer Programs, JavaScript Edition. The JavaScript sublanguages Source §1, Source §2, Source §3 and Source §4 are designed to be just expressive enough to support all examples of the respective chapter of the textbook.

References