# Unspoken Assumptions Underlying OO Design Maxims

DevFeed: [Unspoken Assumptions Underlying OO Design Maxims](<https://devfeed.tech/articles/unspoken-assumptions-underlying-oo-design-maxims-32238.md>)

Original publisher: [Read original article](<https://bruceeckel.com/blog/2019-12-24-unspoken-assumptions-underlying-oo-design-maxims/>)

Author: Bruce Eckel

Published: 2019-12-24T00:00:00Z

Content type: opinion

Language: en

Sources: [Bruce Eckel - Computing Thoughts](<https://devfeed.tech/sources/bruce-eckel-computing-thoughts.md>)

Topics: [solid principles](<https://devfeed.tech/topics/solid-principles.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [coupling](<https://devfeed.tech/tags/coupling.md>), [design](<https://devfeed.tech/tags/design.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [post](<https://devfeed.tech/tags/post.md>)

## AI overview

The author argues that design maxims can encourage unnecessary complexity when they assume developers can predict how a system will change or that abstractions are always worth their cost. The open-closed principle is described as isolating changes in new components; the author asks why to add that flexibility when the direction of change is uncertain. Kotlin's requirement to mark base classes `open` is offered as an example of extension being opt-in. "Program to an interface, not an implementation" is presented as advice to minimize assumptions about implementation, not to use Java's `interface` keyword everywhere; indiscriminate interfaces can obscure useful abstractions. The author's proposed test is to question each abstraction and remove it if it cannot be justified without citing a maxim.

## Source excerpt

For Atomic Kotlin, I've been struggling with an "atom" (very small chapter) during the last couple of months. It's on object-oriented design, and it brought up a lot of feelings I've had for quite awhile about some of the various maxims and design guidelines that have appeared in recent decades, since OO became mainstream. I couldn't quite put my finger on what bothered me about these design ideas. Then @codingunicorn did it for me by writing a post called Flexible code considered harmful.