Structure and Interpretation of Computer Programs, JavaScript Adaptation


Structure and Interpretation of Computer Programs, JavaScript Adaptation is an adaptation of the computer science textbook Structure and Interpretation of Computer Programs. 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 adaptation uses the programming language JavaScript.
The National University of Singapore published draft editions online since 2012, and a first public release on December 13 2019. As of 2019, the book is continuously updated and improved by the community of its readers. It has been used in NUS's introductory course in computer science. As its original, SICP JS focuses on discovering general patterns for solving specific problems, and building software systems that make use of those patterns.

Content

The book describes computer science concepts using Source, a series of sublanguages of JavaScript. It also uses a virtual register machine and assembler to implement JavaScript interpreters and compilers.

License

The text of the book is licensed under a Creative Commons Attribution NonCommercial ShareAlike 4.0 License, while the programs are licensed under the GNU Public Licence 3.0.

Origin

SICP JS has been used in the course CS1101S at the National University of Singapore since 2012.

Differences to the original textbook

While the book focuses on principles, models and abstractions for programming rather than specific programming languages, all examples in the original version 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 literal in most places. Scheme's homoiconicity is replaced by references to an explicit parser in Chapters 4 and 5.