Dynamic Namespaces

At the current time, efforts across a number of problems spaces around ECMAScript can be seen to relate to the idea of a non-first class Dynamic Namespace construct which overlaps with some of the behaviours of the Module namespace objects and a cheaper one-time evaluation substitute to Object contexts in a with (…) {} closure.

I’ve been slowly exploring the need for this for a while now. My focus in the past few months was strongly influenced by the underlying requirements identified by the proposal for Dynamic Modules which is geared for ESM and CommonJS interop in Node.js. It became more clear over time that solving the problems of static versus dynamic bindings is the core issue to be addressed.

On the SES front, imho it is possible to leverage a suitably designed Dynamic Namespaces construct and would love to workout what those requirements would look like.

I am still laying groundwork, ie a few bullets nothing more at this point, but wanted to share it with the group a week or two before discussing to gauge interest.

The working draft is here:

https://www.smotaal.io/markout/#/experimental/modules/documents/Dynamic%20Namespaces.md

Edit: Fixed link glitch