3 ms·
"Flat is better than nested" - The Zen of Python I had an "everything should be broken into a hierarchy!" stage back when I was learning to code, and boy was I
by gary_0 5y ago
"Flat is better than nested" - The Zen of Python
I had an "everything should be broken into a hierarchy!" stage back when I was learning to code, and boy was I off track. In my defense, at the time (and this dates me) OOP was all the rage.
- icedchai 5y agoI find OOP spaghetti can be incredibly difficult to navigate, example: Class hierarchies 4 or 5 layers deep, some subclasses overriding the parent, others not. It can be it very difficult to follow what's actually going on. Procedural spaghetti is more manageable, though I once had to update a C app with a 3000 line case statement. Pure madness.
- arealaccount 5y agoInheritance hell would be more lasagna code. Golang does a good job of addressing this one particular problem.
- jamesfinlayson 5y agoI remember working on a project with endless exception class hierarchies - that was a monumental pain when trying to diagnose what led to an exception. In a subsequent project we banned subclassing of exceptions.