News for hackers. Stuff that matters.
Re:The controller pattern is awful (and other OO heresy) by extasia on Monday July 10, 2023 @01:58PM (#36670318)
Theres an argument that it teaches new programmers poor habits.
Re:The controller pattern is awful (and other OO heresy) by thfuran on Monday July 10, 2023 @02:27PM (#36670832)
What poor habit and what argument?
Re:The controller pattern is awful (and other OO heresy) by nailer on Monday July 10, 2023 @04:07PM (#36672215)
Unnecessary wrappers. Obviously anything longer than

    print('hello world') 
is a waste. If the language violates Exupery's law why shouldn't developers?
Re:The controller pattern is awful (and other OO heresy) by __MatrixMan__ on Monday July 10, 2023 @04:17PM (#36672351)
Generally 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.

Re:The controller pattern is awful (and other OO heresy) by AtlasBarfed on Monday July 10, 2023 @07:32PM (#36674504)
Classes 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.

Re:The controller pattern is awful (and other OO heresy) by __MatrixMan__ on Monday July 10, 2023 @08:15PM (#36674904)
If 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.