Paul Graham: Essays 2024年11月25日
Java's Cover
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文探讨了黑客如何通过一些外部特征来判断一项技术的优劣,以Java为例,作者Paul Graham阐述了为什么他认为Java看起来像一个“劣质”语言。文章分析了Java被过度炒作、目标用户群体层次较低、存在 ulterior motives、缺乏热衷拥护者等多个方面,并将其与C、Perl、Smalltalk等优秀语言进行了对比,最终得出Java可能不会成为一门成功的语言的结论。文章并非对Java进行批判,而是对Java的‘包装’进行质疑,并强调了程序员需要学会通过一些外部特征来判断哪些技术值得投入时间和精力。

🤔 **过度炒作:**真正的标准不需要大力推广,像C、Unix、HTML等都是逐渐成为标准的,而Java却经历了大规模的宣传,这在黑客看来,反而令人怀疑其价值。

👎 **目标群体层次较低:**Java的设计初衷是为了降低编程门槛,使其易于被C程序员接受,这使得它更像一种为大众设计的、而非由开发者驱动的语言,而历史证明,为他人设计的语言往往质量不高。

💰 **存在 ulterior motives:**Java的出现并非单纯是为了解决编程问题,而是Sun公司为了对抗微软而精心策划的一部分计划,这使得Java的动机显得不纯粹。

💔 **缺乏热衷拥护者:**优秀的编程语言通常拥有忠实的拥护者,但Java却缺乏这种热情,人们使用它更多是因为被迫,而非出于热爱。

💼 **设计目标为大型组织:**Java的设计目标是服务于大型组织,满足大型团队的需求,这与黑客追求极致的编程体验和强大功能的理念相悖。

⚠️ **与DoD(美国国防部)关系密切:**DoD对Java的青睐,在作者看来,反而是一个不祥之兆,因为DoD的文化与黑客文化截然相反,他们的软件选择往往并不明智。

April 2001This essay developed out of conversations I've had withseveral other programmers about why Java smelled suspicious. It's nota critique of 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 whatmade Java seem suspect to me.Some people who've read this think it's an interesting attempt to write aboutsomething that hasn't been written about before. Others say Iwill get in trouble for appearing to be writing aboutthings I don't understand. So, just incase it does any good, let me clarify that I'm not writing hereabout Java (which I have never used) but about hacker's radar(which I have thought about a lot).The aphorism "you can't tell a book by its cover" originated inthe times when books were sold in plain cardboard covers, to bebound by each purchaser according to his own taste. In those days,you couldn't tell a book by its cover. But publishing has advancedsince then: present-day publishers work hard to make the coversomething you can tell a book by.I spend a lot of time in bookshops and I feel as if I have by nowlearned to understand everything publishers mean to tell me abouta book, and perhaps a bit more. The time I haven't spent inbookshops I've spent mostly in front of computers, and I feel asif I've learned, to some degree, to judge technology by its coveras well. It may be just luck, but I've saved myself from a fewtechnologies that turned out to be real stinkers.So far, Java seems like a stinker to me. I've never written a Javaprogram, never more than glanced over reference books about it,but I have a hunch that it won't be a very successful language.I may turn out to be mistaken; making predictions about technologyis a dangerous business. But for what it's worth, as a sort oftime capsule, here's why I don't like the look of Java:1. It has been so energetically hyped. Real standards don't haveto be promoted. No one had to promote C, or Unix, or HTML. A realstandard tends to be already established by the time most peoplehear about it. On the hacker radar screen, Perl is as big as Java,or bigger, just on the strength of its own merits.2. It's aimed low. In the original Java white paper, Goslingexplicitly says Java was designed not to be too difficult forprogrammers used to C. It was designed to be another C++: C plusa few ideas taken from more advanced languages. Like the creatorsof sitcoms or junk food or package tours, Java's designers wereconsciously designing a product for people not as smart as them.Historically, languages designed for other people to use have beenbad: Cobol, PL/I, Pascal, Ada, C++. The good languages have beenthose that were designed for their own creators: C, Perl, Smalltalk,Lisp.3. It has ulterior motives. Someone once said that the world wouldbe a better place if people only wrote books because they hadsomething to say, rather than because they wanted to write a book.Likewise, the reason we hear about Java all the time is not becauseit has something to say about programming languages. We hear aboutJava as part of a plan by Sun to undermine Microsoft.4. No one loves it. C, Perl, Python, Smalltalk, and Lisp programmerslove their languages. I've never heard anyone say that they lovedJava.5. People are forced to use it. A lot of the people I know usingJava are using it because they feel they have to. Either it'ssomething they felt they had to do to get funded, or something theythought customers would want, or something they were told to do bymanagement. These are smart people; if the technology was good,they'd have used it voluntarily.6. It has too many cooks. The best programming languages have beendeveloped by small groups. Java seems to be run by a committee.If it turns out to be a good language, it will be the first timein history that a committee has designed a good language.7. It's bureaucratic. From what little I know about Java, thereseem to be a lot of protocols for doing things. Really goodlanguages aren't like that. They let you do what you want and getout of the way.8. It's pseudo-hip. Sun now pretends that Java is a grassroots,open-source language effort like Perl or Python. This one justhappens to be controlled by a giant company. So the language islikely to have the same drab clunkiness as anything else that comesout of a big company.9. It's designed for large organizations. Large organizations havedifferent aims from hackers. They want languages that are (believedto be) suitable for use by large teams of mediocre programmers--languages with features that, like the speed limiters in U-Haultrucks, prevent fools from doing too much damage. Hackers don'tlike 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. Thereason: today's teenage hacker is tomorrow's CTO.10. The wrong people like it. The programmers I admire most arenot, on the whole, captivated by Java. Who does like Java? Suits,who don't know one language from another, but know that they keephearing about Java in the press; programmers at big companies, whoare amazed to find that there is something even better than C++;and plug-and-chug undergrads, who are ready to like anything thatmight get them a job (will this be on the test?). These people'sopinions change with every wind.11. Its daddy is in a pinch. Sun's business model is being underminedon two fronts. Cheap Intel processors, of the same type used indesktop machines, are now more than fast enough for servers. AndFreeBSD seems to be at least as good an OS for servers as Solaris.Sun's advertising implies that you need Sun servers for industrialstrength applications. If this were true, Yahoo would be first inline to buy Suns; but when I worked there, the servers were allIntel boxes running FreeBSD. This bodes ill for Sun's future. IfSun runs into trouble, they could drag Java down with them.12. The DoD likes it. The Defense Department is encouragingdevelopers to use Java. This seems to me the most damning sign ofall. The Defense Department does a fine (though expensive) job ofdefending the country, but they love plans and procedures andprotocols. Their culture is the opposite of hacker culture; onquestions of software they will tend to bet wrong. The last timethe DoD really liked a programming language, it was Ada.Bear in mind, this is not a critique of Java, but a critique ofits cover. I don't know Java well enough to like it or dislikeit. This is just an explanation of why I don't find that I'm eagerto learn it.It may seem cavalier to dismiss a language before you've even triedwriting programs in it. But this is something all programmers haveto do. There are too many technologies out there to learn themall. You have to learn to judge by outward signs which will beworth 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. They just smelled wrong.It could be that in Java's case I'm mistaken. It could be that alanguage promoted by one big company to undermine another, designedby 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.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Java 黑客 编程语言 技术判断 Paul Graham
相关文章