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

methods in type{} #36

Open
cooper opened this issue Nov 20, 2016 · 1 comment
Open

methods in type{} #36

cooper opened this issue Nov 20, 2016 · 1 comment

Comments

@cooper
Copy link
Owner

cooper commented Nov 20, 2016

It would be neat if you could define methods within a type interface. This would require though that the object returned by the type is actually a new object wrapping the original one. Or maybe use the same object but make it an instance of the type interface by pushing the interface's prototype to the object's *isa.

@cooper
Copy link
Owner Author

cooper commented Nov 20, 2016

If this becomes a thing, we can get rid of the object conformance caching. Skip all the checks and return the object as-is if the type's prototype is present.

cooper added a commit that referenced this issue Nov 20, 2016
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