JavaScript Edition
Harold Abelson,Gerald Jay Sussman
Adapted to JavaScript by: Martin Henz, Tobias Wrigstad, Julie Sussman
Computer_Programs#
JavaScript#
SICP#
نسخهای جدید از کتاب کلاسیک و پرکاربرد، اکنون با زبان برنامهنویسی JavaScript بازنویسی شده است.
از زمان انتشار نخستین نسخه در سال ۱۹۸۴ و ویرایش دوم در سال ۱۹۹۶، کتاب Structure and Interpretation of Computer Programs (SICP) تأثیر عمیقی بر برنامههای درسی علوم رایانه در سراسر جهان گذاشته است. این کتاب که بهطور گستردهای بهعنوان کتاب درسی استفاده شده، ریشه در یکی از دورههای ورودی محبوب علوم کامپیوتر در مؤسسه فناوری ماساچوست (MIT) دارد که توسط هارولد ابلسون و جرالد جی. ساسمن تدریس میشد.
SICP مفاهیم بنیادی محاسبه را از طریق ساخت مجموعهای از مدلهای ذهنی برای محاسبات به خواننده معرفی میکند. نسخههای پیشین این کتاب از زبان برنامهنویسی Scheme برای مثالهای برنامهنویسی استفاده میکردند، اما این نسخهی جدید از ویرایش دوم برای زبان JavaScript بازنویسی شده است.
سه فصل نخست کتاب، مفاهیم عمومی برنامهنویسی را پوشش میدهند—مفاهیمی که در همه زبانهای سطحبالای مدرن مشترکاند. اما فصلهای چهارم و پنجم، که در نسخههای قبلی از Scheme برای طراحی پردازندههای زبان استفاده میکردند، نیاز به بازنویسی گسترده داشتند.
فصل چهارم حاوی مطالب جدیدی از جمله مقدمهای بر مفهوم تجزیه برنامه (parsing) است. در فصل پنجم، مفسر و کامپایلر با یک مدیریت پنهان پشته (stack discipline) طراحی شدهاند تا از عبارات بازگشتی همراه با دستور return
(ویژگی رایج در زبانهای مبتنی بر دستورات) پشتیبانی شود، بدون آنکه بازگشت دمی (tail recursion) از بین برود.
برنامههای JavaScript موجود در این نسخه با هر پیادهسازی که مطابق با استاندارد ECMAScript 2020 باشد اجرا میشوند و با استفاده از پکیج جاوااسکریپت sicp، که از طریق وبسایت MIT Press قابل دسترسی است، در دسترس قرار گرفتهاند.
A new version of the classic and widely used text adapted for the JavaScript programming language.
Since the publication of its first edition in 1984 and its second edition in 1996, Structure and Interpretation of Computer Programs (SICP) has influenced computer science curricula around the world. Widely adopted as a textbook, the book has its origins in a popular entry-level computer science course taught by Harold Abelson and Gerald Jay Sussman at MIT. SICP introduces the reader to central ideas of computation by establishing a series of mental models for computation. Earlier editions used the programming language Scheme in their program examples. This new version of the second edition has been adapted for JavaScript.
The first three chapters of SICP cover programming concepts that are common to all modern high-level programming languages. Chapters four and five, which used Scheme to formulate language processors for Scheme, required significant revision. 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.
The JavaScript programs included in the book run in any implementation of the language that complies with the ECMAScript 2020 specification, using the JavaScript package sicp provided by the MIT Press website.
Table of Contents
1 Building Abstractions with Functions
2 Building Abstractions with Data
3 Modularity, Objects, and State
4 Metalinguistic Abstraction
5 Computing with Register Machines
Harold Abelson is Class of 1922 Professor of Computer Science and Engineering at MIT.
Gerald Jay Sussman is Panasonic Professor of Electrical Engineering at MIT.
Martin Henz is Associate Professor of Computer Science at the National University of Singapore.
Tobias Wrigstad is Professor of Computer Science at Uppsala University.