5 ms·
Only ones I ever found worthwhile are D and maybe I.
by diarrhea 3y ago
Only ones I ever found worthwhile are D and maybe I.
- mytailorisrich 3y agoS (Single responsibility principle) is very important, not only for OOP but for good, maintainable software design in general (yes, even if you do firmware stuff).
- diarrhea 3y agoAbsolutely. I just find it rather inactionable, as it can be subjective.
- mytailorisrich 3y agoOdd because that's arguably the easiest to apply when designing software.
- tetromino_ 3y agoThe only part of SOLID that is unquestionably correct is "L" - it is the only sane way to use subclassing in OO languages. "D", when used judiciously, can be useful because it can make unit tests much easier to write. But when used too much, it results in incomprehensible code. But as for "I", in my humble opinion, when you find yourself reaching for it, it's a sign that the code base is already poorly organized.
- fhars 3y agoBut the L part is only correct in so far as it repeats the definition of what it means to be a subtype, i.e. it is vacuously true. BY the way, does any OO language apart form Ocaml get this right?
- ahtihn 3y agoThe L part was apparently not so obvious to the authors of the Java standard library since it has violations all over it. Readonly implementations of java.util.List come to mind.