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


当前回答

这是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.

这种语言与c语言的形容词有相似之处,而Java也有相似之处。

它最初被命名为Mocha,但后来更名为LiveScript,最后由于市场原因更名为JavaScript。为了适应当时的Java趋势,在LiveScript和Java之间出现了一个叫做LiveConnect的接口。这个连接打算用新的名称“JavaScript”来表示。

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

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

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

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