2026-09-21
每日一句 · 技术圈趣话
“Programs must be written for people to read, and only incidentally for machines to execute.”

程序必须为人类阅读而写,只是顺便让机器执行。

— Harold Abelson 和 Gerald Sussman,《计算机程序的构造和解释》(SICP)

背后的故事

这句话出自麻省理工学院经典教材《计算机程序的构造和解释》(Structure and Interpretation of Computer Programs,简称 SICP),由 Harold Abelson 和 Gerald Sussman 合著。SICP 自 1984 年出版以来,一直是计算机科学教育的里程碑,影响了整整几代程序员。书中这句话直接点出了软件工程的核心矛盾:程序员往往只关注代码能否在机器上运行,却忽略了代码首先是给人阅读的。在技术圈,这句话被反复引用,用来批评“写死代码”或“一次性代码”的坏习惯,强调可读性、可维护性和团队协作的重要性。许多资深程序员将其奉为圭臬,认为好的代码应当像一篇清晰的文章,而不是只有机器能懂的晦涩指令。

小测

1. What is the primary message of the quote 'Programs must be written for people to read, and only incidentally for machines to execute'?

2. From which famous computer science textbook does this quote originate?

← 回到今天的「每日一文」