Comment by bakuninsbart

Comment by bakuninsbart 6 days ago

5 replies

OOP is one of the major schools of programming, significantly more widespread than functional languages. The only thing arguably used more is "simple" procedural, but even that is doubtful. Sure, in the 90s people thought OOP was the be-all-end-all, and we've moved away from that, but it still makes complete sense to teach the main different styles of programming. C and assembly are basically covered by a course on computer architecture and OSs, then teaching an intro course on both FP and OOP gives students a broader understanding on how the vast majority of program design works. Follow up courses on algorithms can then have synergy by showing how much easier/safer/faster they are to implement depending on the style.

tptacek 6 days ago

I reject the idea that OO is a "major school of programming"; or, if it is, that school has been largely discredited. I think you're on firmer ground if you claim that ideas from OO still inform modern programming (traits and interfaces being a good example).

I think a lot of 2025 developers would be alarmed to think that a project had started from an object-oriented design perspective.

  • bakuninsbart 5 days ago

    That's a bubble thing. The vast majority of serious software engineering is done in OOP. Java, C# and C++ alone are more than half the market, and then you have Python, Ruby, Kotlin and many more. Even JS has moved largely to (bastard) classes.

    Then you have data (growing above average), scripting and partially frontend that are done differently, but they are still a minority of the job market.

    • tptacek 5 days ago

      If it was 2005 I would take this argument pretty seriously, but it's 2025 and I find it less plausible. Python has (somewhat dumbed down) OOP features, but modern idiomatic Python tends not to be domain-modeled intricately-encapsulated OOP; in fact, it's increasingly functional. You bring up Javascript, and my retort is React: the most popular UI framework in Javascript --- UI frameworks being the archetypical case of a problem domain well-suited for OOP --- is largely a rejection of OOP principles and a marked shift towards functional programming.

      (I'm not a Lisp or functional partisan; like I said downthread, it's Go and Rust for me these days mostly).

      Keep my original point in mind here, which is simply that OOP principles are not a fundament of software development in the same way algorithms, data structures, memory models, and concurrency are. We're discussing curricula that have students learning class-based object-oriented programming as expressed in Java as a requirement, and basic systems programming as an elective. That's backwards.

      I don't care if you still use OOP. I'm not advocating for its removal from production codebases. There are plenty of things that earn their keep in modern product stacks that aren't fundamentals of computer science!

  • mixmastamyk 5 days ago

    It's still useful sometimes. Right now I have a functional-style program I think would be easier to write if was redesigned in Mixin-style OOP. Usually happens the other way, but not always.

    • tptacek 5 days ago

      I don't think it's useless so much as that it's not on the same tier of fundamental importance as structured programming, the memory hierarchy, concurrency, functional decomposition, recursion, trees, tables, and graphs.

      And when you look at what the actual classes teach: it's usually patterns-y Java. GoF patterns are effectively obsolete. You might still need to grok them, but that's trade knowledge, not fundamental computer science. You don't come out of a CS degree knowing Hibernate or SAP, either, but people figure it out on the job.