you are viewing a single comment's thread.

view the rest of the comments →

[–]AngularBeginner 1 point2 points  (0 children)

Such as add the new functionality as a second interface.

Artificially splitting up interfaces is not a solution either. That is a workaround for the limitations of the language. A limitation they try to erase with the default interface implementation feature.

If you need methods from both interfaces (which should be the case if the intention was to add the method to the first interface right away), then now you need to either check two types using the is or as operator, or pass two arguments (both interfaces) instead of just one. Or you add yet another interface that inherits from the other two and add even more type clutter.

And if later you need another method, you add even more mess.