编程与软件工程linuxjournal.com
为什么选择 Python?
Why python?
2008 — 2011,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 Eric S. Raymond(ESR)在 2000 年前后撰写的文章,解释他为何选择 Python 作为主要编程语言。文章从可读性、简洁性、代码美学等角度对比 Python 与 Perl 等语言,强调 Python 让编写优雅代码变得更容易,从而减少错误。虽然年代久远,但其中关于语言设计与可维护性的讨论至今仍有启发。
为什么经久不衰:Python 如今已成为主流语言,而这篇早期倡导文章精准地抓住了它易于阅读和表达的核心优势,是理解 Python 设计哲学与历史脉络的经典文本。
HN 评论精选
对 ESR 的技术判断力表示怀疑,认为他文笔好但实际开发经验不足。
我不太信任 ESR。他非常雄辩,写的东西总是听起来很有说服力。但实际上他是个相当差的开发者,至少在他写大部分文章时是这样。我应用他写的东西时,多半被误导。相比之下,RMS 通常让人反感,但他的文章往往完全正确。所以我对 ESR 写的一切都抱着极大的怀疑。
cypherpunks查看英文原文
I'm not sure if I trust much be ESR. He's extremely eloquent, so what he writes always sounds convincing. In practice, he's a pretty bad developer, or at least he was at the time he wrote most of his stuff (at the time, the most serious technical accomplishment he had under his belt was a refactoring of fetchmail). When I've applied the things he's written, more often than not, they've lead me astray. He has, more often than not, messed up in contexts involving technical interaction with other people (e.g. CML2). This is in stark contrast to e.g. RMS, who usually puts people off, but whose writing tends to be dead-on correct (if you don't believe me, read almost anything he wrote 10-30 years ago, and see how it panned out -- the guy's almost a prophet, cursed to know the truth but not be able to convince people). So I take everything ESR writes with a very large, maybe unhealthy degree of skepticism. It's too easy to be convinced of something incorrect (many eyes make bugs shallow, negative attitude towards RMS, etc.). I'm looking at his page now, and he appears to have written or contributed to more software since, so I'm not sure if this still applies. I suspect it does, but I'm not ready to pass judgment until I read his more recent essays.
一针见血地指出 Python 相对于 Perl 的核心优势是可读性。
于是我一头扎进《Programming Python》,心里最想问的是:它有什么是 Perl 没有的?可读性。
pavel_lishin查看英文原文
> So I dived into Programming Python with one question uppermost in my mind: what has this got that Perl does not? Readability.
认为现代 Python 增加了许多特性,失去了早期“可执行伪代码”的简洁感。
我在这篇文章发表后不久(2002 年?)开始用 Python,我怀疑当年的简洁性还保留了多少。‘现代 Python’充满了列表推导、生成器和装饰器。不是说这本身不好,但它不再是‘可执行的伪代码’了。像《集体智慧》这样的书需要你了解 Python 的细节才能看懂。
samuel查看英文原文
I started to use Python not much after this article(2002?), and I wonder how much of those days' simplicity holds true. "Modern Python" is full of list comprehensions, generators and decorators. Not that's intrinsically bad, but it's not "executable pseudocode" anymore. Books as "Collective Intelligence" require you to know Python intricacies in order to understand it.
引用文章关于代码美学与工程质量关系的精辟观点。
文章里有一段精彩的论述:丑陋的程序就像丑陋的悬索桥,比漂亮的更容易坍塌,因为人类(尤其是工程师)感知美的能力与处理和理解复杂性的能力密切相关。一门让你难以写出优雅代码的语言,也让你难以写出好的代码。
Tycho查看英文原文
Fascinating statement: Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选