-
Notifications
You must be signed in to change notification settings - Fork 40
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 #123
Comments
Which order should we resolve the methods / properties ? DFS or BFS ? As we will have runtime dispatching, there might be multiple base classes containing same methods (virtual or non virtual). In c++ non virtual methods are resolved as ambiguous at compile time, but simulating the same in luabridge is costly (we need to resolve the full inheritance tree and reason about ambiguities). Virtual methods should work, but virtual multiple inheritance might open up several cans of works. Also, traversing the inheritance tree is nearly a linear operation with single inheritance, but can become costly as we add multiple base classes and each base class could have other multiple base classes. |
Sorry for delayed reply. Honestly, I had to google about DFS / BFS, because wasn't familiar with abbreviations, although I quickly understood what it means, as I use A* algorithm in my project, which is an example of BFS. Personally for me the case is really simple: I just want to have one class inherit from a 2-3 bases classes, all of which provide independent functionality, so I'm definitely not going to have any complex resolutions. Because what I have to do now is put one of class on top of inheritance chain, then inherit (completely unnecessarily) another class from it, then another one and so on. |
I started working on this and it's a bit more complex than i initially thought, will need a bit more time to get it working properly. |
Hey @kunitoki, how is the progress on this isssue? |
I had to park it for a while until i have the time to resume it. It will come this summer for sure ! |
Hey @kunitoki, as you replied this to me in extensible classes issue
Can you please do it?
I assume
deriveClass()
should then accept several classes as base instead of one.The text was updated successfully, but these errors were encountered: