Uncle Bob considers 'Interface' harmfull

cover image adapted from original by Amber Case , licensed under CC BY-NC 2.0

Uncle Bob wrote a very interesting article about how he considers the interface keyword to cause more harm than good.

I have to admit I have missed the interface keyword in C++ as a way to refer to the concept in a more streamlined way than just a pure abstract class with no non-static members. "Interface" is just more efficient to actually say.

But Uncle Bob runs us through an argument with an imaginary coder that is defending the interface keyword. As Uncle Bob presses on and questions the assumptions we have all made (or been taught as being absolute truths), we get the opportunity to draw some very interesting conclusions.

I'll try not to spoil too much of the article: During the imaginary discussion, he touches two of my peet peeves with Java. Object as the implicit base of all classes and the impossibility of using multiple inheritance.

Make yourself a favor and read his article. It is short and really easy to read.

You may find yourself agreeing with him. Or not. But taking the time to question you assumptions and rethinking them is always a good thing TM.

In the end I was agreeing with him. As it stands, the interface keyword is doing more harm than good.


Rui Pires

Working as a professional full time remote developer from the Azores since 2011.

Read More