为什么 JavaScript 被称为 JavaScript,因为它与 Java 无关?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2018731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is JavaScript called JavaScript, since it has nothing to do with Java?
提问by Matthew
Since JavaScript is not derived from Java, why does it have "Java" in the name?
既然 JavaScript 不是从 Java 派生出来的,为什么它的名字中有“Java”?
采纳答案by CMS
JavaScript, was originally named Mocha, later it was renamed to LiveScript, and then to JavaScript.
JavaScript,最初命名为 Mocha,后来更名为 LiveScript,然后更名为 JavaScript。
The LiveScript to JavaScript name change came because Netscape and Sun did a license agreement.
LiveScript 到 JavaScript 的名称更改是因为 Netscape 和 Sun 签订了许可协议。
The language was then submitted for standarization to the ECMA InternationalOrganization. By that time, Netscape didn't allow the use of the "JavaScript" name, so the standarized language is named ECMAScript.
然后将该语言提交给ECMA 国际组织进行标准化。到那时,Netscape 不允许使用“JavaScript”名称,因此标准化语言被命名为ECMAScript。
JavaScript isn't actually an open name. Now it's a trademarkof Sun (now Oracle).
JavaScript 实际上并不是一个开放名称。现在它是 Sun(现在是 Oracle)的商标。
There still a lot of confusion, some people still think that JavaScript, JScript, and ECMAScript are three different languages.
还是有很多困惑,有些人还是认为JavaScript、JScript、ECMAScript是三种不同的语言。
ECMAScript is the "standards" name for the language.
ECMAScript 是该语言的“标准”名称。
JavaScript is technically a "dialect" of ECMAScript, the Mozilla Foundation can use "JavaScript" as the name of their implementations (currently present on the Rhinoand SpiderMonkeyengines).
JavaScript 在技术上是 ECMAScript 的“方言”,Mozilla 基金会可以使用“JavaScript”作为其实现的名称(目前存在于Rhino和SpiderMonkey引擎上)。
In the early days, Microsoft decided also to do what Netscape was doing on their own browser, and they developed JScript, which is also an ECMAScript dialect, but was named in this way to avoid trademark issues.
早期,微软决定也做 Netscape 在他们自己的浏览器上做的事情,他们开发了JScript,它也是一种 ECMAScript 方言,但以这种方式命名以避免商标问题。
回答by Sampson
Java is to Javascript what Car is to Carpet.
Java 之于 Javascript,就像 Car 之于 Carpet。
"The language's name is the result of a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with their then-dominant browser."
“该语言的名称是 Netscape 和 Sun 之间联合营销协议的结果,以换取 Netscape 将 Sun 的 Java 运行时与其当时占主导地位的浏览器捆绑在一起。”
回答by Darrell Brogdon
It was a marketing ploy cooked up by Netscape since Java was the big buzz word at the time. Originally it was called LiveScript. Which was probably a better name in hindsight.
这是 Netscape 精心设计的营销策略,因为 Java 是当时的热门词。最初它被称为 LiveScript。事后看来,这可能是一个更好的名字。
回答by Michael Greene
It was originally called Mocha, renamed to LiveScript, and then renamed to JavaScript. JavaScript itself is a trademark of Sun Microsystems -- the official standard is just called ECMAScript.
最初叫 Mocha,改名为 LiveScript,再改名为 JavaScript。JavaScript 本身是 Sun Microsystems 的商标——官方标准只是称为ECMAScript。
Further confusing the matter, Microsoft has decided to call their version JScript. JScript is not at all related to J++, a Microsoft-implemented Java whose name undoubtedly is designed to cause confusion with C++.
更令人困惑的是,微软决定将他们的版本称为 JScript。JScript 与 J++ 完全没有关系,J++ 是一种 Microsoft 实现的 Java,其名称无疑是为了与 C++ 混淆。
回答by CMS
From an interviewmade to its creator Brendan Eich:
来自对其创作者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 Sundid 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.
InfoWorld:据我所知,JavaScript 最初是 Mocha,然后变成 LiveScript,然后在 Netscape 和 Sun 合并后变成 JavaScript。但它实际上与Java无关或与它没有太大关系,对吗?
艾奇:没错。从 5 月到 12 月(1995 年)的六个月内,是 Mocha,然后是 LiveScript。然后在 12 月初,Netscape 和Sun达成了许可协议,它变成了 JavaScript。其想法是使其成为与 Java 和编译语言一起使用的补充脚本语言。
回答by JP Silvashy
We were obsessed with naming things after coffee in the 90's.
90 年代,我们痴迷于用咖啡来命名事物。
I know... what were we thinking?!
我知道……我们在想什么?!
回答by Aurril
The language has similarities to C-adjecents to which Java counts aswell.
该语言与 Java 也很重要的 C 相邻语言有相似之处。
It was first named Mocha but later renamed to LiveScript and finally to JavaScript due to marketing reasons. To accomodate the Java trend during that time there was an interface between LiveScript and Java called LiveConnect. This connection was intented to be expressed with the new name "JavaScript".
它最初被命名为 Mocha,但后来由于营销原因更名为 LiveScript,最后更名为 JavaScript。为了适应当时的 Java 趋势,LiveScript 和 Java 之间有一个名为 LiveConnect 的接口。这种联系旨在用新名称“JavaScript”来表达。
回答by Annath
The project was originally called Mocha, then renamed to LiveScript, and finally to JavaScript when Netscape and Sun did a license agreement. The idea at the time was to make it a scripting language complimentary to Java.
该项目最初称为Mocha,然后更名为LiveScript,最后在 Netscape 和 Sun 达成许可协议时更名为 JavaScript。当时的想法是让它成为一种与 Java 互补的脚本语言。
我的来源。
回答by Hyman
It's just a historical mistake. (and according to me there's no real valid reason to name JavaScript as JavaScript)
这只是一个历史错误。(据我所知,没有真正有效的理由将 JavaScript 命名为 JavaScript)
They have similar names because market was crazy about these new technologies when they were starting to come out (actually Netscape was about to include Java inside Netscape) and they accidentally chose to change LiveScript name to JavaScript. I wrote accidentally because they have nothing in common (apart from being two programming languages) so there's no a real, analytic reason for this similarity.
它们的名字很相似,因为当它们开始出现时,市场对这些新技术非常着迷(实际上 Netscape 即将在 Netscape 中包含 Java),并且他们不小心选择将 LiveScript 名称更改为 JavaScript。我不小心写了,因为它们没有任何共同点(除了是两种编程语言),所以这种相似性没有真正的分析原因。
回答by sandeep manglani
At the time Javascript or Livescript was launched into market the Sun MicroSystems was busy with the java creation so they named it as javascript. Also it uses some basic construts of the java.
在 Javascript 或 Livescript 投放市场时,Sun MicroSystems 正忙于 Java 创建,因此他们将其命名为 javascript。它还使用了 java 的一些基本结构。