Kotlin Code Smell 31 - Not Polymorphic
Problems
Missed Polymorphism
Coupling
IFs / Type check Polluting.
Names are coupled to types.
Solutions
Rename methods after what they do.
Favor polymorphism.
Sample Code
Wrong
class Array {
fun arraySort() { ... }
}
class List {
fun lis...
yonatankarp.com1 min read