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

Multiple Inheritance #29

Open
Mercerenies opened this issue Apr 18, 2018 · 2 comments
Open

Multiple Inheritance #29

Mercerenies opened this issue Apr 18, 2018 · 2 comments

Comments

@Mercerenies
Copy link
Owner

Not actual multiple inheritance, but it would be nice to be able to simulate it.

  • We can already emulate parent lookup with missing (and we use that trick in modules with importAll).
  • Kernel keys is implemented in terms of Parents hierarchy, so it would only be necessary to make hierarchy manipulable to make the illusion complete.
@Mercerenies
Copy link
Owner Author

It's worth noting that a temporary solution is to use mixins, which emulate multiple inheritance by injecting duplicate objects (via Object dup) into the inheritance chain of other objects.

@Mercerenies
Copy link
Owner Author

Following in ES6's footsteps, we could consider using "well-known" symbols in a similar way to Stream dumpHandler to get hierarchy to recognize the alternative parenting.

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