8

According to https://nodejs.org/en/

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

However, according to this answer, JavaScript is:

JavaScript = ECMAScript + DOM API;

and there is no DOM in Node.js runtime. (or is there?) Also quoting from the book: Professional JavaScript for Web Developers:

Though JavaScript and ECMAScript are often used synonymously, JavaScript is much more than just what is defined in ECMA-262. Indeed, a complete JavaScript implementation is made up of the following three distinct parts:

  • The Core (ECMAScript)
  • The Document Object Model (DOM)
  • The Browser Object Model (BOM)

which supports the answer I link to.

Considering the facts above, isn 't it correct to say Node.js is a ECMAScript runtime? If not, what do we need to remove (or add?) if we wanted to fork Node.js and make it an ECMAScript runtime instead of a JavaScript runtime?

8
  • It looks like this comment from the linked answer is related: "Node.js is built against modern versions of V8." & "V8 implements ECMAScript as specified in ECMA-262, 5th edition..." & "The DOM is not, however, typically provided by the JavaScript engine but instead by a browser. The same is true of V8—Google Chrome provides the DOM." - so it looks like the DOM is in V8 then and Node's site is correct in saying that it's a JS runtime? Commented May 11, 2018 at 16:28
  • No offense, but does this matter? Aren't we being a little pedantic with sematics? Lots of things that aren't precisely synonymous are used interchangeably in casual conversation. As for forking, to what purpose? Commented May 11, 2018 at 16:29
  • 1
    "what do we need to remove (or add?) if we wanted to fork Node.js and make it an ECMAScript runtime instead of a JavaScript runtime?" What are you trying to do exactly? Or what are you doing this for? Is this purely theoretical? Commented May 11, 2018 at 16:30
  • @JaredSmith I do not agree official documentation is casual conversation. Commented May 11, 2018 at 16:35
  • 1
    Have you considered that the answer you cited as a "fact" could simply be wrong? Commented May 11, 2018 at 16:36

2 Answers 2

9

The difference between JavaScript and ECMAScript is just a pedantic difference that most people don't really care about. Technically the official language name according to the standard is ECMAScript, but for historical and convenience reasons people almost always call it "JavaScript". I've never met anybody who calls themselves an "ECMAScript developer".

As far as I know, JavaScript doesn't even have an official formal definition. While ECMAScript has a prescriptive definition with versions that are formally defined by their various specifications, the meaning of "JavaScript" is essentially defined by how people use it.

For this reason, Node.js advertises itself as a JavaScript runtime. It might be more "technically correct" to call it an ECMAScript runtime, but it would be more confusing for most people to advertise it that way.

Sign up to request clarification or add additional context in comments.

4 Comments

I think Oracle may disagree with you that it is a "pedantic difference". Though they've never taken legal action, ECMAScript was contrived because JavaScript is a trademark currently owned by Oracle (formerly Sun Microsystems formerly Netscape). See this thread for more details...
@War10ck That's true, organizations that create new technologies avoid naming them "JavaScript" for legal reasons, but it's still a detail that won't matter in most situations.
"JavaScript" is essentially defined by how people use it." Nope. It's defined by how the compiler works. For node, js is what node can actually compile. It doesn't matter "how people use it".
@JuanPerez I think you misunderstood the point. I was talking about the usage of the word "JavaScript", not about the behavior of code. You're right that how code executes is determined by the compiler, but I was talking about what people mean when they use the word "JavaScript".
-2

There are many JavaScript run time environment:

  1. Browsers
  2. Node.js
  3. Deno
  4. Edge Workers
  5. Moddable
  6. Databses
  7. Productivity Software

source: https://www.youtube.com/watch?v=JN7UjvceOlw

Comments

Your Answer

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.