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

Consider opt-in to strong mode #18

Open
davej opened this issue Jun 14, 2015 · 2 comments
Open

Consider opt-in to strong mode #18

davej opened this issue Jun 14, 2015 · 2 comments

Comments

@davej
Copy link

davej commented Jun 14, 2015

Strong mode is supported in the new iojs and EG seems to do a lot of the optimisations by default anyway so it would be nice to be able to opt-in (or perhaps make it the default)?

@breuleux
Copy link
Owner

Ah, yeah, that would be cool! I would have to make some adjustments, though. Since originally I compiled to ES5, optional and rest arguments in EG functions do not compile to ES6 optional/rest arguments, but use arguments instead (this would be a good thing to fix). Also, some object declarations (not the simple ones) build an empty object and then accumulate properties on it (which I think strong mode disallows?) I will keep this in mind, still.

@davej
Copy link
Author

davej commented Jun 14, 2015

Discussed in gitter but repeating here for posterity.

Strong mode does allow a long-handed way to dynamically add properties:

Object.defineProperty(obj, 'a', { value: 'This property was added dynamically!' });

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