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

Implement scoped constant lookup #36

Closed
adambeynon opened this issue Dec 14, 2011 · 4 comments
Closed

Implement scoped constant lookup #36

adambeynon opened this issue Dec 14, 2011 · 4 comments

Comments

@adambeynon
Copy link
Contributor

Constant lookup should be done on scope instead of superclass chain. Makes constant lookup much faster (based on prototypes).

@ghost ghost assigned adambeynon Dec 14, 2011
@adambeynon
Copy link
Contributor Author

Moved back to 0.4.1.

@adambeynon
Copy link
Contributor Author

Once implemented, another point for discussion is const_missing etc. Currently, missing constants result in the NameError being raised, but this step makes const lookup slow, so:

  • default mode: missing constants will be returned as 'null', and likely cause runtime errors, but if a constant is missing in production code then your app will be failing anyway..
  • debug mode: missing constants will continue with current behaviour of raising an exception. Debug mode is the time to fix missing constants.

@adambeynon
Copy link
Contributor Author

Bringing forward to 0.4.0.

@adambeynon
Copy link
Contributor Author

Implemented in 2fcd223.

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

No branches or pull requests

1 participant