Newbie here ! What do experience pro grammars think of the recent wave of “OOP is garbage” comments on the internet ? Is OOP truly on the decline ? Or is it that OOP should be a feature of a language while coding rather than a “everything is an object” mentality.

  • 9
    For sucks sake.
    Every fucking month a scumbag that doesn't know shit posts something about OOP vs FP.
    Wanna know what?
    OOP and FP cover completely different issues and don't interfere with each other in any way.
    This garbage is usually posted by shitcoders who only know Java and now think that every language abides its shitty design.
    OOP is about relation between functionality and data.
    FP is about handling of data.
    I'm very much able to write object-oriented, functional code.
  • 2
    @metamourge Well said

    I find it amusing that people are claiming "Pfff! Those awful ads and other bullshit written by AI are so easy to spot!" Yet we see countless people falling right into their traps and buying the "new trends", "blading fast super uber framework" and shit.
  • 1
    OOP is not garbage and FP is not the all new shiny replacement either. They both have valid use cases and are meant for different purposes. Consider F# and GoLang, they are multi-paradigm languages that can leverage both OOP and FP styles. I generally find that OOP allows me to better organize my code into a natural structure. People who diss OOP are quite ignorant of how to properly leverage it.

    Also, when coding in OOP not everything is an object, you also have static classes and structures etc.
  • 0
    Every decade or 2, someone always comes out with "Hey, paradigm X that we've all been using so far is crap, we should use paradigm Y for everything instead!"

    Most lately, X has been OO and Y functional.

    The reality is that different paradigms are suitable for different purposes, which is why there's very few "pure" real world languages in use. If you want to be good, learn OO, imperative, reactive, functional, etc. and learn where they fit best.
  • 2
    The reality is that OO would be a good solution for modelling stuff… if it weren't for the large amount of useless programmers that write 80s-style imperative code with 95% global variables inside a thin wrapper of OO classes, then half-heartedly refactored to the latest and greatest Enterprise-y mix of design patterns.

    Since the resurgence of functional programming is relatively new, I haven't yet seen as many questionale implementations using (or trying to use) it, but I'm sure that 10 years down the river we will slap our faces with our palms just the way we do nowadays when coming across another OO fuckup.
  • 0
    > if it weren't for the large amount of useless programmers that write 80s-style imperative code with 95% global variables inside a thin wrapper of OO classes

    You just reminded me of one of the worst cases I've ever seen. Basicaly, a coworker had encoded a state machine using an enum, a handful of global booleans, and one huge-ass process() function with a seemingly endless chain of if-else clauses.

    Of course she didn't have to maintain it, because that was the trash code she rushed out the door before going on an extended vacation. No test coverage. "I manually clicked through the process, it works!" - it didn't. Almost all error cases were broken and the code was so brittle it fell apart if you looked at it with both eyes at the same time.

    I liked her as a person, but boy was her code always a dumpster fire. She shouldn't ever have been promoted beyond junior.
Add Comment