5

Just watched a video called "object oriented programming is bad" on youtube. Saying that we all should use functional programming only. Your thoughts?

Comments
  • 9
    It's the same old tired answer: "it depends"
    OO can be bad, it depends.
  • 1
  • 2
    The only Object Oriented Programming is Bad I know of (and that appears when I search on youtube) is the one by Brian Will which tells people to use procedural programming and not functional programming (because he thinks functional languages are too slow).

    https://youtube.com/watch/...
  • 4
    I hate that video with a passion that's beyond reasonable even for satan himself
  • 4
    Oh boy, not this shit again.
    OOP and FP aren't Opposites,
    Imperative Programing and FP are.

    OOP-Techniques like Methods, Interfaces or Inheritance don't collide with FP in any way and, in fact, can be godlike when used with FP.

    Supposedly, the stupid fucker that made that video thinks that OOP and FP are opposites, because he didn't get the memo that FP isn't a class of languages, but a paradigm.
  • 3
    But my OOP is pretty functional.. like, it works.. soooo 🤷🏼‍♂️
  • 1
    @metamourge
    Just this.

    Functional is augmentation for OOP.
  • 5
    I can see arguments against using OOP. but the video that guy made is just straight up stupid, as well as the follow up he made, to try and justify himself
  • 4
    I don't think that OOP is bad in itself. I think that OOP is overrated and for some reason seems to be the default paradigm for anyone, where I rather would have a "let's see if OOP is necessary for this, or if maybe a different approach fits better for this problem" way of looking at things.
    Especially for smaller tools I have seen some that where written in an OOP way of design, but only had very few classes that weren't even really related. It could have been done much easier just using procedural programming.
  • 0
    Depending on how you use OOP I strongly agree with that statement. I think class hierarchies are the wrong way to make your program extendable. I think typeclasses/traits like in haskell or rust are much more useful and intuitive.
  • 3
    "X is bad, everyone should just use Y"

    Well, it depends, since no task is completely equal, doesn't it make sense that the tools or techniques should also be different?

    And besides, bad OOP is just as bad as bad functional code.
  • 0
    I'm more in favour of procedural anyway.
  • 0
    Well, many programming languages are evolving towards true support for multiple paradigms, as such, one could choose a language that supports both FP and OOP. What I really like about FP is that functions are pure, stateless and don't cause any side effects. But if you pay attention you can achieve that in a non FP language as well. Applying such principles in an OO program greatly improves many things. But as always: it depends. FP is quite different compared to OOP and can be difficult to understand. In addition, functions calling functions passing other functions as arguments does not help readability. Also, you see a lot of functions written as one-liners in an FP-style program. Although they may make perfect sense it can be quite hard to understand.

    So, each has pros and cons. You just need to choose wisely.
  • 3
    My thoughts:
    Bandwagon. 🙄
  • 0
  • 0
    I like the video.
  • 0
    Use whatever you need. There are languages in which OOP shines (Kotlin, C#, Vala) and languages which make OOP look like a really bad joke (Java, JS, C++, Go) and languages in which OOP does not really get the work done (C, Shell). OOP has proven to be something that allows easier, faster, more failsafe, development. So no, OOP is not bad. It's the languages that make it look bad. But behind this ugliness, there's always a reason:
    Java: an old language whose design policies don't allow for new and fancy features
    JS: Basically the language which cannot stop implementing buggy features
    C++: An archaic native language which is designed to be extremely fast.
    Go: A language that aims at being extremely fast.
  • 1
    @aggelalex i totally agree with that!!
Add Comment