Comment by tptacek
Comment by tptacek 6 days ago
I mostly point it out as a reason why teaching OO as a fundamental is a bad idea in the first place.
Comment by tptacek 6 days ago
I mostly point it out as a reason why teaching OO as a fundamental is a bad idea in the first place.
I disagree? The point of a CS degree isn't to prepare you for the 20 years of stale J2EE code your first job is going to throw at you, and object-oriented design is pretty out of fashion.
What programming job are you getting in the next few years that understanding oo isn’t important?
Inheritance, polymorphism and encapsulation inform every major professional programming language and framework (except c). Even go which in many ways is active response to oo uses most of those concepts extensively. One major challenge of people programming in go is how to adapt the familiar patterns to it.
Now I’d probably not teach the whole GoF as an exercise in cataloging patterns but teaching a few of the most common while showing the concept of patterns (probably the least well understood concept in development) seems sensible.
My argument accepts the idea that you're likely to come across object-oriented code in your first jobs in the field, the same way you're going to come across complicated SQL joins, which is also something a CS curricula is unlikely to prepare you for. I would advocate for delegating OO concepts to that kind of level of "trade knowledge" rather than elevating it to a "fundamental" of computer science.
Rust and Go have concepts that approximate class-based object-oriented programming (and: if you look at NEU's OO syllabus, that's what they're doing), but only barely. You could teach someone how to use an interface without teaching "polymorphism" as a concept. Encapsulation as a language feature is an example of an OO-ism that I think is done and dusted. We hid implementation details in C, too! The notion of an abstract data type is fine to hold on to. The idea of "friend classes" and "protected" fields and other ACLs for variables, though, I don't think we're going to see come back.
People are still writing OO code today, they way the industry stands it looks like people will still be writing OO code for at least the next decade. Maybe the next 20 years, even.
I understand that not every developer is a big fan of OO but that doesn't mean we can ignore it.
OO is one of many paradigms to take while programming. Between functional programming, C-style subroutine programming, and OO, or the more recent amalgamations of those, you pick whatever suits your problem best. It's perfectly useful to teach, even if you dislike OO programming. I don't like writing for outdated programming designs like Scheme or LISP either, but that doesn't mean they don't have anything useful to teach.
OO is out of fashion just like blockchains and NFTs are out of fashion, and the same way AI will fall out of fashion in the future. The huge hype around it will die and what's left covers the few useful scenarios.
>> and object-oriented design is pretty out of fashion
OO isn't debunked and its not out of fashion.
All that's happened is that it's no longer gospel that "the only way to program is OO".
I write code that has all sorts of styles and approaches that fit the task at hand and sometimes the right tool for the job is OO.
I get the sense you're saying that OO has been proven to be hokum and no one should learn it or do it anymore and all that remains OO is the smoking ruin of 20 years of Java. That's not correct at all.
You’re assuming an exaggeration of their point. The question at hand is whether OO is so fundamental as the backbone of a computer science 101 course. This doesn’t preclude much of what you said.
how did it ever become gospel. given the diversity of human experiences, and the the diversity of problems we have to tackle, it is near impossible for there to be one and only way to solve a problem.
But OO is a fundamental, even if it isn’t longer gospel.
OO is important and if I’m three years of computer science there’s no time to teach it then you have to ask what you’d heck they are doing.
OO is everywhere and it’s an important software concept and is the right solution for certain classes of problem.