News for hackers. Stuff that matters.
Re:Notes from an Interviewer by tetromino_ on Saturday February 24, 2024 @09:55AM (#39491877)
The 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.

Re:Notes from an Interviewer by fhars on Saturday February 24, 2024 @10:21AM (#39492118)
But 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?

Re:Notes from an Interviewer by ahtihn on Saturday February 24, 2024 @04:53PM (#39495448)
The 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.