Context
I recently met this suggestion with the C # default interface methods.
I read both the specification and , more importantly, the motivation . Maybe I missed something, but the motivation stinks a bit for me.
The only practical difference between an interface and a fully abstract class was that a future class can implement (so [IS A]) multiple interfaces, but can inherit (so be [IS A]) from only one abstract class (and all the consequences)
What is incomprehensible to me, what is the exact difference between abstract classes and interfaces with default methods now , except that we can bring multiple (implementation) inheritance to an image with default methods, which is impossible with abstract classes. (I do not want to open a question / discussion, is it good or bad, this is not the topic here)
However, motivation speaks of completely different, three points:
- "... the author of the API adds methods to the interface in future versions without breaking the source ...". Well, the author of the "API" can add methods to the abstract class and to a future version if he implements them without breaking anything.
- "... # API-, Android (Java) iOS (Swift),...". , , , , , Swift. , 0,0% , .
- "... , " "...". , "" . ( [IS A] ). [IS A]... , , , .
, ( ) ?