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

Non-modifiable originals #24

Open
guybedford opened this issue May 17, 2019 · 1 comment
Open

Non-modifiable originals #24

guybedford opened this issue May 17, 2019 · 1 comment

Comments

@guybedford
Copy link

This whole proposal is really great and exciting to see.

Ideally it would be nice if the originals could be non-modifiable, since even with this proposal, dangling properties on the functions or objects can still intercept and change usage between modules.

In addition there should surely be optimization benefits in being to having objects that know not to expect mutation surprises.

Object.freeze could work for anything that isn't possible to subclass.

For globals that support subclassing, we may still need a new type of non-modifiable primitive though.

@littledan
Copy link
Contributor

I'm not sure about this. If originals are non-modifyable, they need to have a separate identity. This makes it basically a separate iframe per iframe, semantics-wise, with all the implied memory costs, and points back to the previous design (with all its issues) to avoid the overhead. I'm not really sure why this freezing would be helpful for JS developers.

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