-
Notifications
You must be signed in to change notification settings - Fork 32
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
Remove calls to base::function() in overridden methods #23
Comments
Hi there, thank you for your proposal. There are drawbacks on your proposal:
So, now I consider the drawbacks overweight the benefits. |
There is no "namespace pollution", because the method is not in a place where it would conflict with a user's own method. ie, the global namespace. A base_* method would be a legitimate implementation method which user should not be calling. It could be made private, accessible to implementation callers via friendship, if it was necessary. I fundamentally disagree with the design that requires overridden methods to call implementation methods. The overridden methods should just do work that pertain to them, not work that should be performed by the implementation. But, it's your codebase and I'm just an observer, so you do you. |
Thank you anyway, for your opinion. I'll keep the issue, and may be will apply it later, i.e. after some code stabilization/a few releases. |
Looking at the interface for actors, it would be nice to remove the noise from the overridden methods, so that the code only deals with its own logic. It's cleaner that way.
Instead of this:
Have this, to eliminate the need to call
rotor::actor_base_t::on_start()
:The text was updated successfully, but these errors were encountered: