In https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md, we just list the divergences without getting into a lot of details. Some of those divergences are the result of bad coordination. Some of those divergences are far more fundamental and are related to
I think it would be important to understand and document why there are certain divergences, and to what capability of the runtime they map to. I think the term "Divergences" is a negative, while "Capability map" is a more neutral term, and we should document the differences, not expressing a judgement.
As an example, https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md#http-access compares fetch to require('http').request. However the two have very different capabilities and requirements in terms of caching, security and connection reuse. They are not a 1-1 map.
I think something that we should create is a Capability map, and explain why fetch() is hard to implement in Node.js and why require('http').request is impossible to implement in a browser. fetch() is a high-level utility that provide cached, secured http request capability in the browser. require('http').request provides low-level, uncached and unsecured http request capability in Node.js. Having a single, per-process HTTP cache in Node.js is not in the scope of the project.
Another example is that Node.js do not have a builtin DOM.
Note that there are some of the listed divergences that do not map to any underlining or required capability, and they are just the result of bad coordination or prior art. Those typically could be solved.
In https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md, we just list the divergences without getting into a lot of details. Some of those divergences are the result of bad coordination. Some of those divergences are far more fundamental and are related to
I think it would be important to understand and document why there are certain divergences, and to what capability of the runtime they map to. I think the term "Divergences" is a negative, while "Capability map" is a more neutral term, and we should document the differences, not expressing a judgement.
As an example, https://github.com/littledan/js-shared-interfaces/blob/master/DIVERGENCES.md#http-access compares
fetchtorequire('http').request. However the two have very different capabilities and requirements in terms of caching, security and connection reuse. They are not a 1-1 map.I think something that we should create is a Capability map, and explain why
fetch()is hard to implement in Node.js and whyrequire('http').requestis impossible to implement in a browser.fetch()is a high-level utility that provide cached, secured http request capability in the browser.require('http').requestprovides low-level, uncached and unsecured http request capability in Node.js. Having a single, per-process HTTP cache in Node.js is not in the scope of the project.Another example is that Node.js do not have a builtin DOM.
Note that there are some of the listed divergences that do not map to any underlining or required capability, and they are just the result of bad coordination or prior art. Those typically could be solved.