The Elements of Programming Style (2/e) - Brian W. Kernighan, P. J. Plauger

The Elements of Programming Style (2/e)

Brian W. Kernighan, P. J. Plauger

出版社

McGraw-Hill

出版时间

1978-01-01

ISBN

9780070342071

评分

★★★★★
精彩摘录
  • "* Write clearly - don't be too clever. * Say what you mean, simply and directly. * Use library functions. * Avoid temporary variables. * Write clearly - don't sacrifice clarity for "efficiency." * Let the machine do the dirty work. * Replace repetitive expressions by calls to a common function. * Pa"
用户评论
好像跟兔子换了本Lonely Planet的书。
看的是摘要的翻译版本,这些原则都还蛮是实用的。
可惜是针对Fortran
A timeless classic.
经典的编程风格指南。虽然里面示例是Fortran和PL/I代码,但总结的编写优秀代码的规则具有普遍性,比如不要过早优化,过度注释等。
Kernighan老人家应该是想仿写一下 The Elements of Style. 末尾Summary of rules 部分可作为一个checklist。
FORTRAN!!!!
还不错啦,不过现在读有点晚了,大部分都是在常年编程中会得出的概念。
这些rules应该在刚学编程的时候就介绍。另,FORTRAN和PL/I读起来很吃力,字母全是大写的高级语言看起来跟汇编语言差不多
收藏