7

Is JavaScript an open source programming language? I want to know how some objects and methods work.

I mean, is the compiler, interpreter, or parser for JavaScript open source?

Damjan Pavlica
34.6k10 gold badges77 silver badges82 bronze badges
asked Jul 23, 2011 at 8:37
4
  • You can have a look at the specification ecma-international.org/publications/standards/Ecma-262.htm Commented Jul 23, 2011 at 8:39
  • 4
    Is there any closed source programming language? Commented Jul 23, 2011 at 8:42
  • 6
    @Kermia: learn the difference between a language and an implementation. Python is a language, with multiple implementations (CPython, pypy, Jython, IronPython, for example). JavaScript is a language, with multiple implementations (V8, SpiderMonkey, etc.) Commented Jul 23, 2011 at 8:43
  • 1
    your question should rather be, "is compiler/interpreter/parser for Javascript open source?" Commented Jul 23, 2011 at 8:44

3 Answers 3

10

There are numerous open source JavaScript engines (V8, Rhino and SpiderMonkey spring to mind) as well as closed source implementations (I assume that whatever Opera and Microsoft use are not open source).

The language is fairly tightly based on the ECMAScript specification, which is freely available.

answered Jul 23, 2011 at 8:39
Sign up to request clarification or add additional context in comments.

Comments

2

What do you mean by open source language?

JavaScript is interpreted by the browser and depends upon the vendor and developer which engine it uses. Some of the popular engines are listed in List of ECMAScript engines .

Peter Mortensen
31.3k22 gold badges110 silver badges134 bronze badges
answered Jul 23, 2011 at 8:40

Comments

0

In addition to the answer given above, there is also an open source .NET implementation of JavaScript available: Its name is Jurassic, and it is available on CodePlex:

http://jurassic.codeplex.com/

Examples:

  1. Execute an expression:

    var engine = new Jurassic.ScriptEngine();

    Console.WriteLine(engine.Evaluate<int>("1.5 + 2.4"));

  2. Execute a script:

    var engine = new Jurassic.ScriptEngine();

    engine.ExecuteFile(@"c:\test.js");

Features of version 2.2 (taken from web site):

  • Supports all ECMAScript 3 and ECMAScript 5 functionality, including ES5 strict mode
  • Simple yet powerful API
  • Compiles JavaScript into .NET bytecode (CIL); not an interpreter
  • Deployed as a single .NET assembly (no native code)
  • Basic support for integrated debugging within Visual Studio
  • Uses light-weight code generation, so generated code is fully garbage collected
  • Tested on .NET 3.5, .NET 4 and Silverlight
answered Jul 20, 2015 at 8:35

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.