Hacker News new | ask | show | jobs
by sharp11 2873 days ago
I’m curious to know why... Looks like typical mixin pattern, no?
1 comments

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.

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! :)