Леонид Черненко's avatar

Леонид Черненко

Леонид Черненко

Member since


Total Reputation


Total Arguments


Total Votes for Arguments

Arguments and votes


The only purpose of interface is to put restriction on architecture.

With interface we define how our code will be dealing with any "external" code - any code that does not know about implementation details. It can be system that uses our library, or just another module in our project decoupled from what is covered by an interface.

So interface is just a boundary, to keep things separated and protect it from unexpected changes.

We show only interfaces to "outer world" and that gives us freedom to make any changes to implementation details.

As long as we don't change interface itself, "outer" code must not change. So "outer" code is isolated and we benefit from that - the less changes we should make, the less error we do and less work overall.

It is the superpower and real purpose of existing of interfaces.

What if interface provide default implementation? It will change when we change the implementation details, so will change - and sometimes break - outer code. And isolation is no longer the case. Changing implementation details in our code we break outer code.

And interfaces with default implementation instantly loose its superpower.

From an architecture tool interface turns to dangerous and unpredictable creature.

So No. I don't want this RFC.

Read the RFC: Interface Default Methods Леонид Черненко avatar
Леонид Черненко
voted no
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!