The Python Paradox
Python悖论
作者:Paul Graham
译者:busycai
原文点击这里。
这篇文章论述了Python的独特性和重要性。
----------------------------------
In a recent talk I said something that upset a lot of people: that you could get smarter programmers to work on a Python project than you could to work on a Java project.
在最近的一次访谈中,我发表了些令许多人沮丧的观点:“与Java项目相比,Python项目能吸引到更加聪明的程序员。”
I didn't mean by this that Java programmers are dumb. I meant that Python programmers are smart. It's a lot of work to learn a new programming language. And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.
我没有任何“Java程序员是愚蠢的”意思,我想说的是,Python程序员通常是聪明的。掌握一门新语言通常需要花大力气,对于那些学Python的人们来说,他们并不只是想用它来混口饭吃,真正原因在于他们热爱编程且对已有语言的不满意。
Which makes them exactly the kind of programmers companies should want to hire. Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those who cared enough to learn it. And for programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job.
这使得他们成为公司真正需要的那类程序员。由于没有一个合适的名称,我将其称为Python悖论:如果一个公司选择使用一种相对高深而优雅的编程语言来开发软件,那么招到的程序员质量通常会更高,因为好的编程语言通常会吸引优秀的程序员;但反过来,如果一个程序员想找到一份好工作,那么他就需要学习一门不仅仅只能用于混饭吃的编程语言(这会使得高深而优雅的编程语言很快沦为仅仅用于混饭吃的编程语言。)
Only a few companies have been smart enough to realize this so far. But there is a kind of selection going on here too: they're exactly the companies programmers would most like to work for. Google, for example. When they advertise Java programming jobs, they also want Python experience.
迄今为止,只有少数公司认识到了这一点。不过也有另外一种可能性,即程序员都非常热爱他们的工作和公司,使得这个悖论不成立。比如,当Google公司在招聘Java程序员时,也需要他们具备Python经验。
A friend of mine who knows nearly all the widely used languages uses Python for most of his projects. He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend more time reading code than writing it. You push blobs of source code around the way a sculptor does blobs of clay. So a language that makes source code ugly is maddening to an exacting programmer, as clay full of lumps would be to a sculptor.
我有一个朋友,他们几乎知晓所有的流行语言,但他在大部分项目中都使用了Python。他这么做的原因是Python源代码看起来更舒服。这听起来可能是一个很滑稽的理由。但仔细想想却又不无道理:当你编程时,阅读代码的时间比编写代码的时间要多得多。就像雕塑家将泥一块块粘到艺术品上,你的代码也是一行行加上去的。所以源代码丑陋的编程语言之于一名严谨的程序员,就像一个充满瑕疵的作品之于一个雕塑家,都是不可接受的。
At the mention of ugly source code, people will of course think of Perl. But the superficial ugliness of Perl is not the sort I mean. Real ugliness is not harsh-looking syntax, but having to build programs out of the wrong concepts. Perl may look like a cartoon character swearing, but there are cases where it surpasses Python conceptually.
说起丑陋代码,人们自然会想起Perl。但Perl只是表面丑陋,它非我所指。真正的丑陋不在于语法形式,而是指基于错误理念来构建程序。Perl可能看起来像一个卡通角色swearing,但有一些例子表明Perl在理念上比Python更出色。
So far, anyway. Both languages are of course moving targets. But they share, along with Ruby (and Icon, and Joy, and J, and Lisp, and Smalltalk) the fact that they're created by, and used by, people who really care about programming. And those tend to be the ones who do it well.
迄今为止,尽管Python和Perl都朝着各自目标在发展,但是他们和Ruby(以及Icon,Joy,J,Lisp,Smalltalk)一样,都是被那些真正关心编程的人创建和使用着。这些人往往会比其他人做得更好。(完)