4 ms·
Theres an argument that it teaches new programmers poor habits.
by extasia 3y ago
Theres an argument that it teaches new programmers poor habits.
- deleted 3y ago[deleted]
- thfuran 3y agoWhat poor habit and what argument?
- nailer 3y agoUnnecessary wrappers. Obviously anything longer than print('hello world') is a waste. If the language violates Exupery's law why shouldn't developers?
- __MatrixMan__ 3y agoGenerally it goes with unnecessary boilerplate that gets copied around without any thought to whether it's necessary. People who have been harmed by too much oop won't just define a function and call it. They'll define a class solely to contain that function and then call it more verbosely. On the face of it it's not that bad but once you start tolerating a habit for doing things because that's how they're done and not because you actually think it's the right way you end up picking up all of these fragments from places where they do belong and forcing them into places where they don't. Or at least, that's what I struggled with when I was new and insecure and wanted people to look at my code and think that I knew what I was doing because I showed evidence of knowing the dogmatic patterns, and I've seen it in others too.
- AtlasBarfed 3y agoClasses are basically namespaces, and trivial code doesn't need them, but quickly you do. A lot of the criticisms being leveled here at oop actually me question their programming experience. There are many valid criticisms, but not a lot levelled here.
- __MatrixMan__ 3y agoIf all you're doing is using classes as superfluous namespacing, we'll that's hardly a threat. It's when they start having superfluous constructors that you're on a dark path. I once knew a guy who had a when-in-doubt-make-it-a-singleton habit, it was maddening to write tests anywhere near him. Obviously that's an amateur move (and being an amateur myself I didn't have the confidence to show him a better way). But then it's never the skilled practitioners that make something look bad anyway.