Mikou
Mikou

Reputation: 651

is javascript a concurrent language or is it the javascript engines that makes the language concurrent?

Is it correct to say that javascript is a concurrent programming language or is it rather the different javascript engines that makes javascript concurrent?

Javascript as a concurrent language is not listed on wikipedia, but node.js is: http://en.wikipedia.org/wiki/Concurrent_computing#Concurrent_programming_languages.

I would appreciate some more information about where the concurrent behaviour of javascript comes from.

Upvotes: 2

Views: 1267

Answers (1)

domitall
domitall

Reputation: 655

To best answer this, it's important to understand what javascript is.

From the ECMAScript language specification

http://www.ecma-international.org/ecma-262/5.1/

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment. ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific host objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program.

It's up to the host to determine the implementation. Node.js is one such host, browsers are another such host. Any host can choose to implement the language as per specification, and as a host can provide its own environment by which information is processed.

So, to answer the question

Is it correct to say that javascript is a concurrent programming language or is it rather the different javascript engines that makes javascript concurrent?

I would say no, it is not correct to say javascript is a concurrent programming language, because the answer to that depends on the host environment (or engine); however, concurrency can be made possible through a host environment (engine) that enables it.

Upvotes: 5

Related Questions