程序设计方法(中文版)

Matthias Fellisen

出版时间

2003-12-01

ISBN

9787115115560

评分

★★★★★

标签

编程

书籍介绍
这是一本把'如何设计程序'讲得极为彻底的书,其杀手锏是一套可机械执行的编写步骤:从问题数据分析、写清合约与用途说明、列例子,到依数据定义搭函数模板、写定义、写测试,每一步都产出明确中间结果。读者记住它的,往往不是Scheme语法本身,而是这种'自顶向下、逐步求精'的严谨工程思维。它不追求炫技,也不教速成,而是逼你慢下来、把每个程序的设计理由落到纸面。因此它适合愿意花时间、想真正建立编程思想的初学者,也适合被'面向对象'惯坏、需要重新思考程序结构的人。若只把精力耗在Scheme语法上,便错失了它的精髓。
AI导读
核心看点
  • 以Scheme语言为载体,系统讲授程序设计的一般理论与方法。
  • 强调函数式编程思维,从简单数据逐步过渡到复杂结构处理。
  • 提供严谨的程序设计步骤,包括合约、模板及测试等规范。
读者共识
  • 被誉为函数式编程入门首选,逻辑清晰,适合培养设计思维。
  • 风格循序渐进,比SICP更友好,适合初学者建立信心。
  • 部分读者认为理论性较强,需一定耐心,不适合追求速成者。
精彩摘录
  • "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"
目录
第一部分 简单数据的处理
第1章 学生、教师和计算机 3
第2章 数、表达式和简单程序 5
2.1 数和算术运算 5
2.2 变量和程序 6

显示全部
用户评论
编程的本质 :把一个量和另一个量相关联 把值代换名进行关系计算;应用excel的过程本身就是一种广义的编程过程。程序就是数量之间的关系,对于特定的输入求取结果,从算术计算到变成对结构体 表 树的计算;程序逐步求精:先设计核心,在增加功能;工程总是由视图和程序组件模型两个部分 辅助函数原则 对于在表述中所提到的或在进行实例计算中所发现的每种依赖关系都使用一个辅助函数进行明确表达
打印错误能少点么
很有营养的一本 思路清晰
归归赠书!拖拖拖终于看完了!
不实用
空谈理论, 而且是复杂的理论
醍醐灌顶
准确的说,应该叫:递归方法的深入剖析
下载
收藏