I'm still struggling with this. Does *anyone* know where, in the wild, Module Environments (a type of Lexical Environment) exist?https://twitter.com/padolsey/status/1151148086812696576 …
ModuleEnvironment is an abstract spec concept. It doesn’t “exist” in implementations in that there is no user-accessible object that directly corresponds to the concept.
-
-
Am I right to presume that it would "exist" as a true scope (i.e. an accessible lexical environment in which we could declare things) in Node.js if Node didn't do that weird module wrapping thing as per https://nodejs.org/api/modules.html#modules_the_module_wrapper … ?
-
And yep to clarify when I say "exists" I mean in terms of talking about the current scope. Like in normal <script>s you'd say "I'm defining stuff in the global scope", while in Node you'd say "I'm defining stuff in the module scope" (Tho in Node it's really just a func scope...)
- 7 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.