既然JavaScript不是从Java派生出来的,为什么它的名字里有“Java”呢?


当前回答

Java之于Javascript,就像汽车之于地毯。

这种语言的名字是Netscape和Sun共同营销交易的结果,作为交换,Netscape将Sun的Java运行时与他们当时占主导地位的浏览器捆绑在一起。 ——http://en.wikipedia.org/wiki/JavaScript历史

其他回答

在90年代,我们痴迷于用咖啡来命名东西。

我知道…我们在想什么?!

这是Netscape公司策划的一种营销策略,因为Java在当时是一个大热门词。最初它被称为LiveScript。事后看来,这个名字可能更好。

节选自对其创作者Brendan Eich的采访:

InfoWorld: As I understand it, JavaScript started out as Mocha, then became LiveScript and then became JavaScript when Netscape and Sun got together. But it actually has nothing to do with Java or not much to do with it, correct? Eich: That’s right. It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. And the idea was to make it a complementary scripting language to go with Java, with the compiled language.

当Javascript或Livescript推出市场时,太阳微系统公司正忙于java的创建,所以他们将其命名为Javascript。 同时还使用了java的一些基本构造。

它最初被称为Mocha,更名为LiveScript,然后更名为JavaScript。JavaScript本身是Sun Microsystems的商标——官方标准就叫ECMAScript。

更让人困惑的是,微软决定将他们的版本命名为JScript。JScript与j++毫无关系,j++是一种微软实现的Java,其名称无疑是为了引起与c++的混淆。