Java's Cover
April 2001 This essay developed out of conversations I've had with several other programmers about why Java smelled suspicious.
2001 年 4 月 这篇文章是根据我与其他几位程序员关于 Java 为何令人可疑的对话而写成的。
It's not a critique of Java!
这不是对Java的批评!
It is a case study of hacker's radar.
这是黑客雷达的案例研究。
Over time, hackers develop a nose for good (and bad) technology.
随着时间的推移,黑客对好的(和坏的)技术产生了敏锐的嗅觉。
I thought it might be interesting to try and write down what made Java seem suspect to me.
我认为尝试写下 Java 对我来说可疑的原因可能会很有趣。
Some people who've read this think it's an interesting attempt to write about
一些读过这篇文章的人认为这是一次有趣的尝试
something that hasn't been written about before.
以前没有写过的东西。
Others say I will get in trouble for appearing to be writing about things I don't understand.
其他人说我会因为看起来在写我不理解的东西而遇到麻烦。
So, just in case it does any good, let me clarify that I'm not writing here about Java (which I have never used) but about hacker's radar (which I have thought about a lot).
所以,为了以防万一它有任何好处,让我澄清一下,我在这里写的不是关于 Java(我从未使用过),而是关于黑客雷达(我对此思考了很多)。
The aphorism "you can't tell a book by its cover" originated in the times when books were sold in plain cardboard covers, to be
“你无法通过封面辨别一本书”这句格言起源于书籍以普通纸板封面出售的时代。
bound by each purchaser according to his own taste.
每个购买者根据自己的喜好进行约束。
In those days, you couldn't tell a book by its cover.
在那些日子里,你无法通过封面来辨别一本书。
But publishing has advanced since then: present-day publishers work hard to make the cover something you can tell a book by.
但从那时起,出版业取得了进步:当今的出版商努力使封面成为你可以辨别一本书的东西。
I spend a lot of time in bookshops and I feel as if I have by now learned to understand everything publishers mean to tell me about a book, and perhaps a bit more.
我在书店里呆了很多时间,我觉得我现在似乎已经学会了理解出版商想要告诉我关于一本书的一切,也许还有更多。
The time I haven't spent in
我没有度过的时间
bookshops I've spent mostly in front of computers, and I feel as if I've learned, to some degree, to judge technology by its cover as well.
我大部分时间都是在电脑前逛书店,我觉得在某种程度上我也学会了通过表面来判断技术。
It may be just luck, but I've saved myself from a few technologies that turned out to be real stinkers.
这可能只是运气,但我已经从一些被证明是真正糟糕的技术中拯救了自己。
So far, Java seems like a stinker to me.
到目前为止,Java 对我来说似乎很糟糕。
I've never written a Java program, never more than glanced over reference books about it, but I have a hunch that it won't be a very successful language.
我从未编写过 Java 程序,也从未浏览过有关它的参考书,但我有预感它不会是一种非常成功的语言。
I may turn out to be mistaken; making predictions about technology is a dangerous business.
我可能是错的;对技术做出预测是一件危险的事情。
But for what it's worth, as a sort of time capsule, here's why I don't like the look of Java: 1.
但就其价值而言,作为一种时间胶囊,这就是我不喜欢 Java 外观的原因: 1.
It has been so energetically hyped.
它已经被如此大力地炒作了。
Real standards don't have to be promoted.
真正的标准不需要推广。
No one had to promote C, or Unix, or HTML.
没有人必须推广 C、Unix 或 HTML。
A real standard tends to be already established by the time most people hear about it.
当大多数人听说它时,真正的标准往往已经建立。
On the hacker radar screen, Perl is as big as Java,
在黑客雷达屏幕上,Perl 与 Java 一样大,
or bigger, just on the strength of its own merits.
或更大,仅凭其自身的优点。
2.
2.
It's aimed low.
它的目标很低。
In the original Java white paper, Gosling explicitly says Java was designed not to be too difficult for programmers used to C.
在最初的 Java 白皮书中,Gosling 明确表示 Java 的设计对于习惯 C 的程序员来说不会太困难。
It was designed to be another C++: C plus a few ideas taken from more advanced languages.
它被设计为另一种 C++:C 加上一些来自更高级语言的想法。
Like the creators of sitcoms or junk food or package tours, Java's designers were consciously designing a product for people not as smart as them.
就像情景喜剧、垃圾食品或旅行团的创造者一样,Java 的设计者有意识地为不如他们聪明的人设计产品。
Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++.
从历史上看,为其他人使用而设计的语言一直很糟糕:Cobol、PL/I、Pascal、Ada、C++。
The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp.
好的语言是那些为自己的创造者设计的语言:C、Perl、Smalltalk、Lisp。
3.
3.
It has ulterior motives.
它别有用心。
Someone once said that the world would be a better place if people only wrote books because they had something to say, rather than because they wanted to write a book.
有人曾经说过,如果人们只是因为有话要说而写书,而不是因为他们想写书,世界将会变得更美好。
Likewise, the reason we hear about Java all the time is not because it has something to say about programming languages.
同样,我们一直听到 Java 的原因并不是因为它与编程语言有关。
We hear about Java as part of a plan by Sun to undermine Microsoft.
我们听说 Java 是 Sun 削弱微软计划的一部分。
4.
4.
No one loves it.
没有人喜欢它。
C, Perl, Python, Smalltalk, and Lisp programmers love their languages.
C、Perl、Python、Smalltalk 和 Lisp 程序员都喜欢他们的语言。
I've never heard anyone say that they loved Java.
我从来没有听过有人说他们喜欢 Java。
5.
5.
People are forced to use it.
人们被迫使用它。
A lot of the people I know using Java are using it because they feel they have to.
我认识的很多使用 Java 的人都在使用它,因为他们觉得必须这样做。
Either it's
要么是
something they felt they had to do to get funded, or something they thought customers would want, or something they were told to do by management.
他们认为必须做的事情才能获得资金,或者他们认为客户会想要的事情,或者管理层告诉他们要做的事情。
These are smart people; if the technology was good, they'd have used it voluntarily.
这些人都是聪明人;如果技术好的话,他们就会自愿使用它。
6.
6.
It has too many cooks.
它的厨师太多了。
The best programming languages have been developed by small groups.
最好的编程语言是由小组开发的。
Java seems to be run by a committee.
Java 似乎是由一个委员会管理的。
If it turns out to be a good language, it will be the first time
如果它被证明是一门好语言,那将是第一次
in history that a committee has designed a good language.
历史上有一个委员会设计出了一种好的语言。
7.
7.
It's bureaucratic.
这是官僚主义。
From what little I know about Java, there seem to be a lot of protocols for doing things.
从我对 Java 的了解来看,似乎有很多协议可以做事。
Really good languages aren't like that.
真正好的语言不是这样的。
They let you do what you want and get out of the way.
他们让你做你想做的事并摆脱困境。
8.
8.
It's pseudo-hip.
这是伪臀部。
Sun now pretends that Java is a grassroots, open-source language effort like Perl or Python.
Sun 现在假装 Java 是一种像 Perl 或 Python 一样的草根开源语言。
This one just happens to be controlled by a giant company.
这恰好是一家大公司所控制的。
So the language is
所以语言是
likely to have the same drab clunkiness as anything else that comes out of a big company.
可能与大公司生产的其他产品一样单调笨重。
9.
9.
It's designed for large organizations.
它是为大型组织设计的。
Large organizations have different aims from hackers.
大型组织的目标与黑客不同。
They want languages that are (believed to be) suitable for use by large teams of mediocre programmers-- languages with features that, like the speed limiters in U-Haul trucks, prevent fools from doing too much damage.
他们想要(被认为是)适合大型平庸程序员团队使用的语言——具有像 U-Haul 卡车中的限速器一样的功能,可以防止傻瓜造成太大的损害。
Hackers don't
黑客不会
like a language that talks down to them.
就像一种居高临下地对他们说话的语言。
Hackers just want power.
黑客只是想要权力。
Historically, languages designed for large organizations (PL/I, Ada) have lost, while hacker languages (C, Perl) have won.
从历史上看,为大型组织设计的语言(PL/I、Ada)已经失败,而黑客语言(C、Perl)则获胜。
The reason: today's teenage hacker is tomorrow's CTO.
原因是:今天的青少年黑客就是明天的首席技术官。
10.
10.
The wrong people like it.
错误的人喜欢它。
The programmers I admire most are not, on the whole, captivated by Java.
总体而言,我最敬佩的程序员并不被 Java 所吸引。
Who does like Java?
谁喜欢Java?
Suits, who don't know one language from another, but know that they keep
西装革履,不懂一种语言和另一种语言,但知道他们保留
hearing about Java in the press; programmers at big companies, who are amazed to find that there is something even better than C++; and plug-and-chug undergrads, who are ready to like anything that might get them a job (will this be on the test?).
在媒体上听说 Java;大公司的程序员,他们惊讶地发现还有比 C++ 更好的东西;还有即插即用的本科生,他们准备好喜欢任何可能让他们找到工作的东西(这会在测试中吗?)。
These people's opinions change with every wind.
这些人的观点随风而变。
11.
11.
Its daddy is in a pinch.
它的爸爸正处于紧要关头。
Sun's business model is being undermined on two fronts.
Sun 的商业模式正在两方面受到削弱。
Cheap Intel processors, of the same type used in
廉价的英特尔处理器,与
desktop machines, are now more than fast enough for servers.
台式机现在对于服务器来说已经足够快了。
And FreeBSD seems to be at least as good an OS for servers as Solaris.
FreeBSD 似乎至少是与 Solaris 一样好的服务器操作系统。
Sun's advertising implies that you need Sun servers for industrial strength applications.
Sun 的广告暗示您需要 Sun 服务器来实现工业强度应用程序。
If this were true, Yahoo would be first in line to buy Suns; but when I worked there, the servers were all Intel boxes running FreeBSD.
如果这是真的,雅虎将是第一个收购太阳队的人;但当我在那里工作时,服务器都是运行 FreeBSD 的 Intel 机器。
This bodes ill for Sun's future.
这对 Sun 的未来来说是一个不祥之兆。
If Sun runs into trouble, they could drag Java down with them.
如果 Sun 遇到麻烦,他们可能会拖垮 Java。
12.
12.
The DoD likes it.
国防部喜欢它。
The Defense Department is encouraging developers to use Java.
国防部正在鼓励开发人员使用 Java。
This seems to me the most damning sign of all.
在我看来,这是最可恶的迹象。
The Defense Department does a fine (though expensive) job of defending the country, but they love plans and procedures and protocols.
国防部在保卫国家方面做得很好(虽然昂贵),但他们喜欢计划、程序和协议。
Their culture is the opposite of hacker culture; on questions of software they will tend to bet wrong.
他们的文化与黑客文化相反;在软件问题上,他们往往会下注错误。
The last time the DoD really liked a programming language, it was Ada.
国防部上一次真正喜欢的编程语言是 Ada。
Bear in mind, this is not a critique of Java, but a critique of its cover.
请记住,这不是对 Java 的批评,而是对其封面的批评。
I don't know Java well enough to like it or dislike it.
我对 Java 的了解还不够深,不足以决定喜欢或不喜欢它。
This is just an explanation of why I don't find that I'm eager to learn it.
这只是解释为什么我不渴望学习它。
It may seem cavalier to dismiss a language before you've even tried writing programs in it.
在你尝试用一种语言编写程序之前就放弃它,这似乎是漫不经心的。
But this is something all programmers have to do.
但这是所有程序员都必须要做的事情。
There are too many technologies out there to learn them
有太多的技术需要学习
all.
所有。
You have to learn to judge by outward signs which will be worth your time.
你必须学会通过外在的迹象来判断,这将是值得你花时间的。
I have likewise cavalierly dismissed Cobol, Ada, Visual Basic, the IBM AS400, VRML, ISO 9000, the SET protocol, VMS, Novell Netware, and CORBA, among others.
我同样傲慢地拒绝了 Cobol、Ada、Visual Basic、IBM AS400、VRML、ISO 9000、SET 协议、VMS、Novell Netware 和 CORBA 等。
They just smelled wrong.
他们只是闻起来不对劲。
It could be that in Java's case I'm mistaken.
就 Java 而言,我可能错了。
It could be that a language promoted by one big company to undermine another, designed by a committee for a "mainstream" audience, hyped to the skies,
可能是一家大公司为了破坏另一家公司而推广的一种语言,由一个委员会为“主流”受众设计的,被炒作到天空,
and beloved of the DoD, happens nonetheless to be a clean, beautiful, powerful language that I would love programming in.
尽管如此,它还是一种干净、美观、强大的语言,深受国防部的喜爱,我很喜欢用它来编程。
It could be, but it seems very unlikely.
有可能,但似乎可能性很小。