News for hackers. Stuff that matters.
Re:OO in Python is mostly pointless by kwdc on Wednesday January 27, 2021 @03:31PM (#25933529)
I've done plenty of maintenance programming. Most OO involves abuse of the paradigm anyway.

Most people don't use inheritance to large AND good effect. Or they use it and create a mess. Deep hierarchies of inheritance need to be carefully designed or they become a mess. All the hiding means less clarity about what is happening when things go wrong.

That said, its a valid approach and can yield useful results. Especially when you can just add a thing to a list and simply call a method on it without having to bother to know what it is.

Re:OO in Python is mostly pointless by jope12 on Wednesday January 27, 2021 @04:34PM (#25934275)
>Deep hierarchies of inheritance need to be carefully designed or they become a mess.

Deep hierarchies of anything need to be carefully designed.

Re:OO in Python is mostly pointless by kwdc on Thursday January 28, 2021 @12:06AM (#25938431)
The flip side of my impromptu "rule" is that you can drop the "careful" part as long as you are comfortable with a little or a lot of mess. Obvious common sense lowers the tolerance. I wonder how others set their tolerance? My perspective is that most OO hoerarchies don't go too deep. I've seen 4-5 at rare extremes. Around 2-3 is common. I'm sure someone has encountered 10 or more. I shudder to think how well that turns out in practice.
Re:OO in Python is mostly pointless by brixon on Wednesday January 27, 2021 @05:28PM (#25934996)
I try to use the rule of after three levels of inheritance or abstraction then it needs to be a black box and then you can reset your count.