Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the BuiltinModule definition a global and not a builtin module? #65

Open
guybedford opened this issue Sep 13, 2020 · 3 comments
Open

Comments

@guybedford
Copy link

guybedford commented Sep 13, 2020

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.

@guybedford guybedford changed the title Why is the BuiltinModule definition not a global? Why is the BuiltinModule definition a global and not a builtin module? Sep 13, 2020
@ljharb
Copy link
Member

ljharb commented Sep 13, 2020

How would a Script synchronously get access to builtin modules that way?

@guybedford
Copy link
Author

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!)

@guybedford
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants