← Paul Graham

If Lisp is So Great

如果 Lisp 有那么伟大
 ·  Paul Graham  ·  原文

May 2003 If Lisp is so great, why don't more people use it?

2003 年 5 月 如果 Lisp 如此出色,为什么没有更多的人使用它?

I was asked this question by a student in the audience at a talk I gave recently.

在我最近的一次演讲中,一位听众中的学生问了我这个问题。

Not for the first time, either.

这也不是第一次了。

In languages, as in so many things, there's not much correlation between popularity and quality.

在语言中,就像在许多事情中一样,流行​​度和质量之间没有太大的相关性。

Why does John Grisham ( King of Torts sales rank, 44) outsell Jane Austen ( Pride and Prejudice sales rank, 6191)?

为什么约翰·格里沙姆(《侵权之王》销量排名第 44)的销量超过简·奥斯汀(《傲慢与偏见》销量排名第 6191)?

Would even Grisham claim that it's because he's a better

甚至格里沙姆也会声称这是因为他是一个更好的人

writer?

作家?

Here's the first sentence of Pride and Prejudice: It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of a wife.

《傲慢与偏见》第一句话是这样的:有钱的单身男人一定要娶个老婆,这是举世公认的真理。

"It is a truth universally acknowledged?" Long words for the first sentence of a love story.

“这是举世公认的真理?”爱情故事的第一句话很长。

Like Jane Austen, Lisp looks hard.

就像简·奥斯汀一样,Lisp 看起来很难。

Its syntax, or lack of syntax, makes it look completely unlike the languages most people are used to.

它的语法,或者说缺乏语法,使它看起来完全不同于大多数人习惯的语言。

Before I learned Lisp, I was afraid

在我学习 Lisp 之前,我很害怕

of it too.

也有它的。

I recently came across a notebook from 1983 in which I'd written: I suppose I should learn Lisp, but it seems so foreign.

我最近偶然发现一本 1983 年的笔记本,上面写着:我想我应该学习 Lisp,但它看起来太陌生了。

Fortunately, I was 19 at the time and not too resistant to learning new things.

幸运的是,我当时19岁,对学习新事物并没有太抗拒。

I was so ignorant that learning almost anything meant learning new things.

我太无知了,学习几乎任何东西都意味着学习新东西。

People frightened by Lisp make up other reasons for not using it.

害怕 Lisp 的人会编造其他不使用它的理由。

The standard excuse, back when C was the default language, was that Lisp

当 C 是默认语言时,标准的借口是 Lisp

was too slow.

太慢了。

Now that Lisp dialects are among the faster languages available, that excuse has gone away.

现在 Lisp 方言已成为速度更快的语言之一,这个借口已经不复存在了。

Now the standard excuse is openly circular: that other languages are more popular.

现在,标准借口是公开循环的:其他语言更受欢迎。

(Beware of such reasoning.

(小心这样的推理。

It gets you Windows.) Popularity is always self-perpetuating, but it's especially so in programming languages.

它让您获得 Windows。)流行总是自我延续的,但在编程语言中尤其如此。

More libraries get written for popular languages, which makes them still more popular.

更多的库是为流行语言编写的,这使得它们更加流行。

Programs often have to work with existing programs,

程序通常必须与现有程序一起工作,

and this is easier if they're written in the same language, so languages spread from program to program like a virus.

如果它们是用同一种语言编写的,这会更容易,因此语言会像病毒一样从一个程序传播到另一个程序。

And managers prefer popular languages, because they give them more leverage over developers, who can more easily be replaced.

管理者更喜欢流行语言,因为它们使他们比开发人员更有影响力,而开发人员更容易被替换。

Indeed, if programming languages were all more or less equivalent, there would be little justification for using any but the most popular.

事实上,如果编程语言或多或少都是等效的,那么除了最流行的语言之外,就没有理由使用任何语言。

But they aren't all equivalent, not by a long

但它们并不全是等价的,不是很长

shot.

射击。

And that's why less popular languages, like Jane Austen's novels, continue to survive at all.

这就是为什么像简·奥斯汀的小说这样不太流行的语言仍然继续存在的原因。

When everyone else is reading the latest John Grisham novel, there will always be a few people reading Jane Austen instead.

当其他人都在读约翰·格里沙姆的最新小说时,总会有少数人读简·奥斯汀。

中文为机器翻译,仅供参考。