Upgrade to Pro — share decks privately, control downloads, hide ads and more …

uncle-bob-invitation-to-read-SICP-and-learn-about-the-horrendous-costs-of-introducing-assignment.pdf

 uncle-bob-invitation-to-read-SICP-and-learn-about-the-horrendous-costs-of-introducing-assignment.pdf

(download for better quality) Uncle Bob’s invitation to read SICP and learn about the horrendous costs of introducing assignment.

related: "Introducing Assignment invalidates the Substitution Model of Evaluation and violates Referential Transparency - as explained in SICP (the Wizard Book)" https://www.slideshare.net/pjschwarz/introducing-assignment-invalidates-the-substitution-model-of-evaluation-and-violates-referential-transparency-as-explained-in-sicp-the-wizard-book

tags: assignment, environment model, fp, functional programming, mutation, sicp, structure and interpretation of computer programs, substitution model

Philip Schwarz

December 09, 2018
Tweet

More Decks by Philip Schwarz

Other Decks in Programming

Transcript

  1. stub 1 sicp.mov Robert Martin @unclebobmartin So very quickly I

    wanted to walk you through SICP and especially the discussion of assignment. Now in this book, on page 13…they talk about the Substitution Model of Procedure Application, and this model describes how a computer works without assignment. They don’t say that it is without assignment, they just say this is how a computer works, by substitution of procedure after procedure. This takes about 2 pages to describe. Given that, they then zip through a massive amount of other stuff, from data structures, to algorithms, to objects, to symbol tables, to very deep an interesting topics of code and discussion, oh my they just go on and on, and boy, this is a fun book to read, they just rip through these topics, super fast, they apologize for nothing, they just make this a really interesting read, I remember reading it and virtually throwing the pages, almost like a good mystery novel, or something, and then the surprise happens, way the heck out here, on page 217, they introduce modularity, objects and state, and immediately they begin to apologize, oh my goodness, assignment has been introduced, into this topic, you don’t even realize that that there is no assignment statements in the first 200 and some odd pages of this book, and after a long discussion about just assigment they finally start talking about things like the costs of introducing assignment, which of course are horrendous, and then they go on more, talking about more stuff about sameness and change and modeling state and pitfalls of imperative programming, and then they have to replace their model of computing with the Environment Model of Evaluation, and this goes on and on and on, remember those simple two pages are now being replaced with page after page of discussion about the rules of how you evaluate things when you add an assignment statement in them and they talk about how to apply and oh my gosh it is so hard. It is really fascinating to realize the complication that assignment creates in just the way you have to think about computing. Anyway, great book, you should read it. 23 Dec 2010 MIT Press, 1984; ISBN 0-262-01077-1 https://www.dropbox.com/s/x1n1374jpfqlt94/stub%201%20sicp.mov?dl=0 https://mitpress.mit.edu/sites/default/files/sicp/index.html