3 ms·
I would augment that to "ALWAYS favor composition over inheritance" IMHO Solid is nice but I always struggle to remember what the acronym stands for. I mentall
by jillesvangurp 8y ago
I would augment that to "ALWAYS favor composition over inheritance"
IMHO Solid is nice but I always struggle to remember what the acronym stands for. I mentally translate this to just optimizing two easy to remember metrics: classes should have low coupling and high cohesiveness. This also applies to functions and not just classes. E.g. functions with lots of parameters are a problem.