How to Design Programs

Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi

出版社

The MIT Press

出版时间

2001-02-12

ISBN

9780262062183

评分

★★★★★
书籍介绍
这本书最鲜明的立场,是把编程当成一种可习得、可教授的设计活动,而非灵光一现的天赋。它不满足于让你'写出能跑的代码',而是要求你从问题陈述出发,先分析、再设定清晰目标、构造测试示例、依据分析搭出方案骨架,最后才落笔成码并逐条验证。每一步都留下明确的中间产物,使'如何思考'显形于'如何编码'之前。读者反馈中反复出现的关键词是'设计函数的好思想'——它教的是面对未知问题时如何拆解、如何自证,这套能力外溢到任何需要严谨思考的领域。正因如此,它常被视作《SICP》的温和前阶:用Racket与DrScheme降低门槛,代价是节奏偏慢、例子显得琐碎。它适合愿意慢下来、把'为什么这样设计'反复咀嚼的初学者,而非只求速成的进阶者。
AI导读
核心看点
  • 聚焦程序设计过程,培养批判性思维与细节关注能力
  • 提供从问题分析到测试的完整设计指南与中间产物
  • 通过Scheme语言教学,强调函数式编程与递归思维
读者共识
  • 被誉为编程入门神作,力荐给所有想学编程的人
  • 相比SICP更友好,是学习函数式编程的优秀跳板
  • 虽被嫌啰嗦,但Step by Step的教学风格极适合新手
精彩摘录
  • "In contrast to lists, structures deal with value extractions as a constant time operation. In general, what we really wish to have in a programming language is: 1.a class of compound values size with constant lookup time, 2.based on ``keys.'' Because the problem is so common, Scheme and most other l"
  • "DrScheme also provides a vector analogue to build-list. It is called build-vector. Here is how it works: 1.(build-vector N f) = (vector (f 0) ... (f (- N 1))) That is, build-vector consumes a natural number N and a function f on natural numbers. It then builds a vector of N items by applying f to 0,"
  • "<vdf>= (define <var> <val>) | (define <var> <exp>);定义函数语法糖 | (define-struct <var> (<var> ...<var>)) <val>= <con> | <lst> | <prm> | <fun> | <void> <lst>= empty | (cons <val> <lst>) <fun>= (lambda (<var> ...<var>) <exp>) <exp>= <var> | <con> | <prm> | (<exp> <exp> ...<exp>) | (cond (<exp> <exp>) ...(<"
  • "We rewrite subexpressions in a left-to-right and top-to-bottom order. At each stage in the evaluation, we best start by underlining the subexpression that must be evaluated next."
  • "Scheme and many other languages typically provide built-in functions for comparing two structural values extensionally and intensionally. The corresponding Scheme functions are equal? and eq?. In Scheme, both functions are applicable to all values, whether mutators and selectors are accessible or hi"
  • "A variable is a placeholder that stands for an unknown quantity. Programs are Function Plus Variable Definitions"
  • "define-struct posn (x y)) When DrScheme evaluates this structure definition, it creates three operations for us, which we can use to create data and to program: make-posn, the CONSTRUCTOR, which creates posn structures; posn-x, a SELECTOR, which extracts the x coordinate; posn-y, also a selector, wh"
  • "The first category is that of variables, which are the names of functions and values. The second introduces constants: boolean, symbolic, and numeric constants. As indicated before, Scheme has a powerful number system, which is best introduced gradually by examples. The final category is that of pri"
用户评论
探求程序设计的本源……入门好书,就算你是牛人,也要推荐看看!
利用scheme教授编程为数不多的教材,大概翻了下,基本是《SICP》前三章的详细讲解版,但是用了drscheme作为运行平台。
没看完就结课系列(
scheme果然是很经典,不过比SICP要简单呢
好书好书好书!!!!
算了吧,别看了,买回来也不会认真读的。
在每个不同的阶段来回读一遍应该会有不一样的收获
Racket
挺好的
教你编程素养,怎么去设计编程 主要有,面向信息编程和数据是有状态的
下载
收藏