据说,Google公司内部只使用四种语言:C++(最高效的系统开发语言,没法不用),Java(Java教父Joshua Bloch在此), Python(Python之父Guido在此) 和JavaScript(Web客户端,没法不用)。这一点曾经得到
人在Google的王咏刚兄的证实。
前两天,据RubyCLR的创造者
John Lam报道,Google的
Steve Yegge(八卦:这位老兄貌似娶了一位极貌美的华裔妻子)因项目需要,试图说服自己的公司采纳Rails(当然也就顺带上了Ruby)未遂,最终决定
把Rails移植到JavaScript上(这哥们太能写了,动辄长篇大论)。在6个月时间里,他花了2000个小时,完成了这一盛举。他比较了Java、Jython等,最终采用了
Mozilla的Rhino(用Java编写的JavaScript开源实现)。
此事
Infoq做了详细跟踪报道。其中对Google公司对语言管理很严的理由很有意思:
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.
文中,他还回答了这个项目的未来。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1669659