rspec/rules/S110/rule.adoc
2023-06-13 16:32:31 +02:00

6 lines
539 B
Plaintext

== Why is this an issue?
Inheritance is one of the most valuable concepts in object-oriented programming. It's a way to categorize and reuse code by creating collections of attributes and behaviors called classes, which can be based on previously created classes.
But abusing this concept by creating a deep inheritance tree can lead to complex and unmaintainable source code. Often, an inheritance tree becoming too deep is the symptom of systematic use of "inheritance" when other approaches like "composition" would be better suited.