Open guybedford opened 3 years ago
How would a Script synchronously get access to builtin modules that way?
So the expectation is that scripts should be able to access builtin modules? And this makes the global constraint? Makes sense to me.
Perhaps we could reconsider the framing here then - and say that BuiltinModule
is BOTH a global and a builtin module? (and ideally the last global!)
I really don't like the global though at all I must admit. It seems counter intuitive to introduce a global to get rid of needing to introduce new globals.
It would help to hear some of the motiviations for the global, and why these could not be adequately replaced with treating the BuiltinModule object as a builtin module itself.
It seems to me like this would be a great opportunity for the builtin system to bootstrap itself.