據(jù)說,Google公司內(nèi)部只使用四種語言:C++(最高效的系統(tǒng)開發(fā)語言,沒法不用),Java(Java教父Joshua Bloch在此), Python(Python之父Guido在此) 和JavaScript(Web客戶端,沒法不用)。這一點(diǎn)曾經(jīng)得到
人在Google的王詠剛兄的證實(shí)。
前兩天,據(jù)RubyCLR的創(chuàng)造者
John Lam報(bào)道,Google的
Steve Yegge(八卦:這位老兄貌似娶了一位極貌美的華裔妻子)因項(xiàng)目需要,試圖說服自己的公司采納Rails(當(dāng)然也就順帶上了Ruby)未遂,最終決定
把Rails移植到JavaScript上(這哥們太能寫了,動(dòng)輒長篇大論)。在6個(gè)月時(shí)間里,他花了2000個(gè)小時(shí),完成了這一盛舉。他比較了Java、Jython等,最終采用了
Mozilla的Rhino(用Java編寫的JavaScript開源實(shí)現(xiàn))。
此事
Infoq做了詳細(xì)跟蹤報(bào)道。其中對(duì)Google公司對(duì)語言管理很嚴(yán)的理由很有意思:
Each language you "officially" support at a company has a pretty heavy tax -- infrastructure support, documentation, training for devs, code duplication, and other downsides. [P]rogramming languages have a core of standard functionality that everyone knows, followed by a long tail of murky semantics that become increasingly difficult to figure out, especially for dynamic languages with no actual spec like Perl, Python, Ruby and their ilk. Google very prudently keeps the number of languages as small as practical, so that we can build up large groups of experts on the semantics of the languages we‘ve chosen. One of the reasons Google‘s code base is so clean and homogeneous is that they‘ve standardized on C++, Java, Python and JavaScript as the only official languages for production work. It‘s also to cut down on the combinatorial explosion of components required for language interoperability.
文中,他還回答了這個(gè)項(xiàng)目的未來。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1669659