Rhino和Spidermonkey JavaScript引擎的区别是什么?

时间:2021-07-23 06:55:46

For the first time, I began learning Javascript, however on the start I stuck up with two possible options: Rhino and Spidermonkey. Could you please, tell me what is one, and what is another, so I can easily choose for myself the best option that suits my needs. If it makes easier for you, you can list advantages and disadvantages of both Javascript versions.

第一次,我开始学习Javascript,但开始时我有两种可能的选择:Rhino和Spidermonkey。你能不能告诉我什么是一种,什么是另一种,这样我就可以很容易地为自己选择最适合我的选择。如果它使您更容易,您可以列出两个Javascript版本的优缺点。

2 个解决方案

#1


18  

It depends on what you're trying to do with JavaScript. If your intent is just to learn the language then I recommend using a web browser such as Chrome or Firefox and using their built-in (or addon) JavaScript consoles.

这取决于你用JavaScript做什么。如果您只是想学习这门语言,那么我建议您使用Chrome或Firefox等web浏览器,并使用它们内置的(或addon) JavaScript控制台。

As to your specific question about standalone JavaScript interpreters, here are some notes:

关于您关于独立JavaScript解释器的具体问题,这里有一些注释:

  1. Rhino - implemented in Java, intended primarily for use as a scripting engine extension for the Java platform. Includes an interactive command-line console, which will be helpful for learning.
  2. Rhino——在Java中实现的,主要用于作为Java平台的脚本引擎扩展。包括交互式命令行控制台,这将有助于学习。
  3. SpiderMonkey - implemented in C/C++, intended for use as the JavaScript engine in Firefox.
  4. SpiderMonkey -在C/ c++中实现,用于Firefox中的JavaScript引擎。

See also:

参见:

  1. V8 - implemented in C++, designed primarily as the Chrome browser's JavaScript implementation; well suited for embedding.
  2. V8 -在c++中实现,主要设计为Chrome浏览器的JavaScript实现;非常适合嵌入。
  3. node.js - a standalone, evented, asynchronous JavaScript environment, based on V8.
  4. 节点。js——基于V8的独立的、可实现的异步JavaScript环境。
  5. Narwhal - a CommonJS platform.
  6. Narwhal -一个常见的js平台。
  7. Windows Script Host - includes a JScript interpreter (ECMAScript based, very similar to modern JavaScript).
  8. Windows脚本主机——包括一个JScript解释器(基于ECMAScript,与现代JavaScript非常相似)。

#2


3  

Rhino is written in Java. SpiderMonkey is written in C/C++. I wouldn't go near either for the purposes of "learning JavaScript", for which a browser is probably more suitable.

Rhino是用Java编写的。SpiderMonkey是用C/ c++编写的。我也不会为了“学习JavaScript”而走得太远,因为浏览器可能更适合学习JavaScript。

#1


18  

It depends on what you're trying to do with JavaScript. If your intent is just to learn the language then I recommend using a web browser such as Chrome or Firefox and using their built-in (or addon) JavaScript consoles.

这取决于你用JavaScript做什么。如果您只是想学习这门语言,那么我建议您使用Chrome或Firefox等web浏览器,并使用它们内置的(或addon) JavaScript控制台。

As to your specific question about standalone JavaScript interpreters, here are some notes:

关于您关于独立JavaScript解释器的具体问题,这里有一些注释:

  1. Rhino - implemented in Java, intended primarily for use as a scripting engine extension for the Java platform. Includes an interactive command-line console, which will be helpful for learning.
  2. Rhino——在Java中实现的,主要用于作为Java平台的脚本引擎扩展。包括交互式命令行控制台,这将有助于学习。
  3. SpiderMonkey - implemented in C/C++, intended for use as the JavaScript engine in Firefox.
  4. SpiderMonkey -在C/ c++中实现,用于Firefox中的JavaScript引擎。

See also:

参见:

  1. V8 - implemented in C++, designed primarily as the Chrome browser's JavaScript implementation; well suited for embedding.
  2. V8 -在c++中实现,主要设计为Chrome浏览器的JavaScript实现;非常适合嵌入。
  3. node.js - a standalone, evented, asynchronous JavaScript environment, based on V8.
  4. 节点。js——基于V8的独立的、可实现的异步JavaScript环境。
  5. Narwhal - a CommonJS platform.
  6. Narwhal -一个常见的js平台。
  7. Windows Script Host - includes a JScript interpreter (ECMAScript based, very similar to modern JavaScript).
  8. Windows脚本主机——包括一个JScript解释器(基于ECMAScript,与现代JavaScript非常相似)。

#2


3  

Rhino is written in Java. SpiderMonkey is written in C/C++. I wouldn't go near either for the purposes of "learning JavaScript", for which a browser is probably more suitable.

Rhino是用Java编写的。SpiderMonkey是用C/ c++编写的。我也不会为了“学习JavaScript”而走得太远,因为浏览器可能更适合学习JavaScript。