Reports talk:Tasks not implemented in JavaScript: Difference between revisions

From Rosetta Code
Content added Content deleted
(Question: "is node.js javascript?")
 
(The DOM model of browsers is '''not''' part of the JS language, and figures nowhere in ECMAScript)
Line 2: Line 2:
Node.js is not same "Javascript" as in browser. It allows system API and C implementations.
Node.js is not same "Javascript" as in browser. It allows system API and C implementations.
So, is Node.js counted in these tasks ?
So, is Node.js counted in these tasks ?

:JavaScript's ECMAScript standards specify only the core language. The DOM model of browsers is '''not''' part of the JS language, and figures nowhere in ECMAScript – the DOM is simply an API made available to JavaScript interpreters that are embedded in browsers.

:JavaScript interpreters are, of course, also embedded in many non-browser contexts, and in each of those contexts relevant APIs are provided (exposed in the global context) for interaction with the rest of the context. Node.js is simply one instance of this general pattern of JavaScript interpreter + context-specific libraries. The JS part of Node.js is exactly the same as the JS part of browser contexts.

:Some of the Rosetta tasks (for example those involving file access and other forms of IO) can not be performed within pure JS itself, they can only be done with one of the other context-specific APIs which are exposed to particular JS interpreter embeddings, and which clearly need to be specified for each task solution. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 21:51, 8 April 2020 (UTC)

Revision as of 21:51, 8 April 2020

Is Node.js Javascript ? Node.js is not same "Javascript" as in browser. It allows system API and C implementations. So, is Node.js counted in these tasks ?

JavaScript's ECMAScript standards specify only the core language. The DOM model of browsers is not part of the JS language, and figures nowhere in ECMAScript – the DOM is simply an API made available to JavaScript interpreters that are embedded in browsers.
JavaScript interpreters are, of course, also embedded in many non-browser contexts, and in each of those contexts relevant APIs are provided (exposed in the global context) for interaction with the rest of the context. Node.js is simply one instance of this general pattern of JavaScript interpreter + context-specific libraries. The JS part of Node.js is exactly the same as the JS part of browser contexts.
Some of the Rosetta tasks (for example those involving file access and other forms of IO) can not be performed within pure JS itself, they can only be done with one of the other context-specific APIs which are exposed to particular JS interpreter embeddings, and which clearly need to be specified for each task solution. Hout (talk) 21:51, 8 April 2020 (UTC)