Hacker News new | ask | show | jobs
by delinka 2872 days ago
An interface declaration is not the right place for implementation. If you want a default implementation, use a base class and inherit, overriding if you don't want the default.

This bug is now another good reason not to use default implementations on interfaces.

2 comments

Protocol extensions are extremely powerful and safe if used correctly and not mixed with class inheritance as in this example.
Ok, thanks. Sounds like you are not a fan of mixins! :)