Why is OOP bad?

Why is OOP bad?

Homeless People Are Sexy Shirt $21.68

UFOs Are A Psyop Shirt $21.68

Homeless People Are Sexy Shirt $21.68

  1. 2 years ago
    Anonymous
    • 2 years ago
      Anonymous

      fpbp

    • 2 years ago
      Anonymous

      yet another dickhead unable to use OO well

      • 2 years ago
        Anonymous

        Nobody nows how to "use OO well".

        • 2 years ago
          Anonymous

          correctly
          oo and the ability to understand it (or not) = the intelligence filter
          gates should never have been let near a computer.
          procedural is for illiterate barbarians
          thugs, like the british government

          • 2 years ago
            Anonymous

            people who wreck systems
            people who destroy decent people, work
            frick their 'jubilee'
            they are failed animals
            worthless cowards
            soldiers suicidign over afghanistan?
            they should t he worthless shit.
            try doing a reaal job
            try doing it for those animals
            waste your fricking time
            british are vermin

          • 2 years ago
            Anonymous

            ill fking get tht bastard
            'progressive' 'roman
            ill get him

      • 2 years ago
        Anonymous

        "Using OO well" is even worse. You didn't watch 1 second of that video, did you.

        • 2 years ago
          Anonymous

          i watched enough of it. it is the same old story
          they don't know how to implement the framework
          he is not intelliigent enough to map out oo in his tiny brain. thats the thing about functional/procedual .. you don't have to remember much. he wants it all in one fking function cos he can't remember. is an idiot. probably british

          • 2 years ago
            Anonymous

            some IDIOT way back. is on youtube was selling 'programming in python without objects'

    • 2 years ago
      Anonymous

      This video revealed to me that most oop haters simply do not use IDEs. They use notepad, or even worse, VIM, and it pisses them off that they have to “jump around” in the code, when normal people with IDEs just press F12. Thats it

      I bet if it was a 15000 line long file he would be overjoyed

      • 2 years ago
        Anonymous

        IDE's are a waste of CPU cycles.
        Imagine if in order to read a book you needed a massive, slow, constantly breaking down machine to help you find the right pages for you.

        • 2 years ago
          Anonymous

          Ok
          Enjoy seething because you had to open two whole textfiles

    • 2 years ago
      Anonymous

      >Object Oriented Programming is bad. I'm one of the 5% of people who think it's completely bad, never good, not useful anywhere
      >6 minutes later
      >Yeah so the ideal way to program is Objected-Oriented + Functional
      ???
      ?!?!
      #@&!%*?!

      I'm not even hating on the guy, I'm an amateur and I wanna get knowledgeable, but this just confuses me.

  2. 2 years ago
    Anonymous

    It isn’t, but it’s overused for a lot of applications where it shouldn’t be used

    • 2 years ago
      Anonymous

      this basically. what most tards on this board don't understand is that there is no single universal solution to all programming problems. use the right tools for the job and stop sperging out "this bad, that good" like a bunch of inbred mongoloids.

      • 2 years ago
        Anonymous

        >on this board
        try the entire fricking internet

        • 2 years ago
          Anonymous

          well... yeah now that you say that.

  3. 2 years ago
    Anonymous

    Way too often the people propagating it are idiots. Like you know when someone mentions "object oriented" whatever the thing that follows is going to be total bullshit.

  4. 2 years ago
    Anonymous

    OOP via composition is useful. Inheritance more than 2 levels deep is stupid and anyone doing that or defending that gets the rope.

    • 2 years ago
      Anonymous

      I love OOP.

      I fricking hate inheritance with a passion.

      Every time I see it used it typically stops making sense after the first level.

      • 2 years ago
        Anonymous

        Exceptions. I hate them with a passion. Anything with exceptions built into it, is just bad by design.
        Especially since exceptions that catch spare data are forcefully created and significantly slow down program speed.

        • 2 years ago
          Anonymous

          >Muh speed
          Ask me how I know you're a filthy undergrad.

    • 2 years ago
      Anonymous

      Dangerously based

    • 2 years ago
      Anonymous

      >OOP via composition is useful. Inheritance more than 2 levels deep is stupid and anyone doing that or defending that gets the rope.
      The truth.

  5. 2 years ago
    Anonymous

    because most OOP out there is the corpo babble flavour that has very little to do with OOP (as implemented in smalltalk)
    good OOP is good, bad OOP is bad, just like with everything else
    it just so happened that OOP became a perversion of its original form

  6. 2 years ago
    Anonymous

    [...]

    Only people browsing this board and saying stuff like that can be ruled out as humans.

    • 2 years ago
      Anonymous

      this

    • 2 years ago
      Anonymous

      [...]
      I need a method for giv coon gf

      In response to the deleted comment.
      I had a gif/webm of a black goddess in her absolute prime that I'd seen on IQfy or /vg/ I think, but I can't fricking find it.

      I've looked at my history and it maybe a thread whose webpage title was "IQfy - "Why are women so ugly in Western games? And don't - Video Games - IQfy", around May 17 2022, but I'm too moronic to find it on tbharchive.

      It's worth it bros.

      • 2 years ago
        Anonymous


        alright IQfy, rate IQfy's taste in women

        • 2 years ago
          Anonymous

          for all intents and purposes, that's just a white woman with a tan

        • 2 years ago
          Anonymous

          Decent, but with makeup anyone can look acceptable

  7. 2 years ago
    Anonymous

    If you write good OOP you feel like a fricking god. Realizing a gigantic complex behavior set can be reduced to a small set of classes with inheritance, interfaces and dependency injections is one of the most kino feelings ever

    • 2 years ago
      Anonymous

      this.
      And if you notice something is slowing everything down its way easier to catch and fix.

      • 2 years ago
        Anonymous

        code gets tinier and tinier
        infinitely tiny

    • 2 years ago
      Anonymous

      You can do this with literally any paradigm. Functional programming will have you breaking problems down into smaller and smaller functions. Even concatenative programming will have you breaking problems down into smaller and smaller routines. Breaking problems down into smaller problems is a fundamental component of programming, and the different paradigms are just different ways to do it. There's nothing special about using objects to do it.

  8. 2 years ago
    Anonymous

    >object woman
    classic

    • 2 years ago
      Anonymous

      Came here to post this.

  9. 2 years ago
    Anonymous

    It's not. Bad is the analyst/user not knowing how to write storys.

  10. 2 years ago
    Anonymous

    It's like saying God isn't real. Nobody can agree on what "God" means in the first place. But the popular version (what you see in Java) is clearly bullshit.

    • 2 years ago
      Anonymous

      >Nobody can agree on what "God" means in the first place
      Purely Actual

  11. 2 years ago
    Anonymous

    fun fact: POO is OOP in Spanish.

  12. 2 years ago
    Anonymous

    Someone wanna replace human with the proper term ?

    • 2 years ago
      Anonymous

      secondary?

  13. 2 years ago
    Anonymous

    Only actual OOP stuff like Smalltalk and Ruby are good
    Java, C++ and clones are crap

  14. 2 years ago
    Anonymous

    It's not just don't treat it like a religion and you'll be fine. People treat object oriented programming like its a hammer and every problem is a nail and you get shit people make fun of. State isn't terrible and is usually needed for most applications you are going to make. Don't force inheritance unless you are using interfaces as they actually function like promises. Use composition over inheritance.

  15. 2 years ago
    Anonymous

    >name is an object, not a string
    Yep, sounds like OOP.

    • 2 years ago
      Anonymous

      why is name an object but email and address are properties

      I think the train of thought was that properties are like physical belongings, the has-relationship. The name doesn't belong to you, it describes you. So how does one call such a relationship? I know! In OOP everything is an object, so it has to be an object

  16. 2 years ago
    Anonymous

    [...]

    I need a method for giv coon gf

    • 2 years ago
      Anonymous

      in real lisp (scheme) this is just
      (giv-coon-gf)

      that function has a lot of side effects tho

  17. 2 years ago
    Anonymous

    i dont even know what inheritance is, i just like having contained variables

    • 2 years ago
      Anonymous

      good, inheritance leads to bad code, composition and message passing should be the main goal of OOP

      • 2 years ago
        Anonymous

        inheritance only leads to bad code if you misuse it

        • 2 years ago
          Anonymous

          it's always misused and when it isn't misused it's useless.

          • 2 years ago
            Anonymous

            >when it isn't misused it's useless.
            wrong

      • 2 years ago
        Anonymous

        Why?

        I find inheritance pretty handy sometimes.

          • 2 years ago
            Anonymous

            >backpedalling

          • 2 years ago
            Anonymous

            public class Animal
            {
            public string Name {get; set; }
            public int Age {get; set; }
            }

            public class Dog : Animal
            {
            //all fields of animal are here ez pz
            }

          • 2 years ago
            Anonymous

            what you would do in real life if you were running a zoo is something like this pseudocode:
            record Animal {
            string Name;
            int Age;
            string Species;
            }

            you certainly wouldn't go around adding a dog.bark() method or whatever nonsense they show in OO tutorials

          • 2 years ago
            Anonymous

            That's one way of doing things, mine is less abstract.

          • 2 years ago
            Anonymous

            a dog is an animal, ok. But at the same time a dog can also be a family member, which isn't an animal. Or a dog could be an asset. Inheritance is just terrible at modeling the world, the world isn't hierarchical

          • 2 years ago
            Anonymous

            abstractConcreteFactoryFactory

            >his language doesn't support multiple inheritance

          • 2 years ago
            Anonymous

            Multiple inheritance is not a good thing. It makes it just worse.
            Use composition instead

          • 2 years ago
            Anonymous

            So the dog contains an animal, a family member and an asset?

          • 2 years ago
            Anonymous

            Yes. This design is way more flexible than any inheritance based approach.

          • 2 years ago
            Anonymous

            >a dog can also be a family member, which isn't an animal.
            Yeah, not with Christian imperialist patriarchy in charge. Agree with the rest for the most part. You can model it. It's just very complex. Think of things like a big relational database.
            Man: ID, Name, age, hair color, eye color, height, statusID, etc..
            Status-Man: StatusID, statustypeid, startdate, enddate
            Man-Business: ManID, business id, begin, enddate
            Employer: ID, employeeid = ManID, etc...
            If I can put it in to a database, I can program for it as well. It just gets, again, really complex.

          • 2 years ago
            Anonymous

            >[Dog] is a family member
            Are you moronic? You don't implement it that way. You literally solved your problem in your sentence. "Dog is a family member" means "Dog is a member of family" which is the same as "Family has a dog" so an object of type Family should contain Dogs and Humans.

            >dog can also be a family member, which isn't an animal
            No shit. That's why you create a FamilyMember interface so that you can choose which Animals are capable of being family members and doing actions like love(), hug(), molest(), or whatever the frick. An abstract Animal or a subclass Mammal won't necessarily be family members so they won't implement the FamilyMember interface, but Dog and Human can be family members so those classes will implement the interface. The Family class should be made so that it can only contain objects that implement the FamilyMember interface.

            This is pretty fricking simple and super easy to scale as you add more animals, and not just animals. Say you're one of those families that consider their Roomba to be a family member. All Roombas are robots, so Roomba will extend abstract Robot and get robot's methods. But, Roomba will implement FamilyMember so Family thehomosexuals will be perfectly satisfied having a Roomba among its ranks.

          • 2 years ago
            Anonymous

            When I don't wanna retype the same method for a bunch of different classes

  18. 2 years ago
    Anonymous

    It falsely assumes that computers are supposed to model problems with non-computer abstractions.

  19. 2 years ago
    Anonymous

    [...]

    this

  20. 2 years ago
    Anonymous

    It's not. Simple as that.

  21. 2 years ago
    Anonymous

    OOP itself isn't bad and, like other styles, has its place. The way people use it can be bad and it often leads people down the wrong path. Often because they don't strictly enforce single responsibility. Many languages also have a lot of overhead defining classes (e.g C++) making it less appealing to create lots of classes to maintain that single responsibility. It's useful/interesting to fire up one the Smalltalks (Pharo, Squeak) and browse around their class hierarchies. Those frickers like it wide and deep.

    • 2 years ago
      Anonymous

      I agree. The problem is not OOP as a concept itself, but how it's implemented. It can be a pain in the ass depending on the tool.

      I swear that most people that hate OOP are failed C++ devs, although C++ is also part of the problem with it's "jack of all trades, master at none" mentality that misleads a lot of people.

  22. 2 years ago
    Anonymous

    Haskell-style typeclasses are the right replacement for inheritance.

  23. 2 years ago
    Anonymous

    [...]

    fpbp

  24. 2 years ago
    Anonymous

    I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters.
    Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.

    • 2 years ago
      Anonymous

      Why is putting functions into global namespace a good thing?
      People tried that in C and ended up making function names like thing__action(thing).

      • 2 years ago
        Anonymous

        he didn't say anything about avoiding namespaces, dummy.
        namespaces are useful, but coupling them to objects is stupid

        • 2 years ago
          Anonymous

          Coupling them to objects is good when it makes sense semantically, which is often.

          • 2 years ago
            Anonymous

            Nope. Still better to separate functions from structs.
            you can put them in the same namespace if you think they are related. But functions are related to structs by their argument types.
            As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects. Because you have to make an arbitrary decision in which object to put them.

          • 2 years ago
            Anonymous

            >As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects
            I take it you have problems with human language grammar too?

      • 2 years ago
        Anonymous

        >Why is putting functions into global namespace a good thing?
        I never said that? Just because you aren't using object doesn't mean you have to regress back to a style without modules/namespaces. Put your functions into logical classes/namespaces/modules/whatever.

    • 2 years ago
      Anonymous

      'easy for the programmer to forget'
      maybe you should try doing something else rather than programming, if you can't remember things

      • 2 years ago
        Anonymous

        >I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters.
        >Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.
        git idiots
        with their little 200 line attempts

        nobody can program systems

        • 2 years ago
          Anonymous

          if you program a system
          you have a fking map of every single
          fricking line of code

          every single
          fricking line of code
          you know what. why where. you know what all the types are

          • 2 years ago
            Anonymous

            you know what leads into what
            you know what becomes what
            you know what generates what
            if you can't remember to that scale
            forget programming
            cos you forget

          • 2 years ago
            Anonymous

            you want to know what 'the land of the forgot'
            =
            'legacy systems' is a term
            of the wastage of the lost info
            'windows'
            'microsoft'

          • 2 years ago
            Anonymous

            legacy companies aren't junk stock
            shitheaps

            microsoft
            facebook
            twitter

            prime stocks
            your economy is nothing
            why the $ is no longer the reserve currency
            you are fricking idiots
            now

          • 2 years ago
            Anonymous

            legacy code companies
            microsoft
            facebook
            twitter
            horrible messes
            so funny
            die america

          • 2 years ago
            Anonymous

            the only stock is amazon

      • 2 years ago
        Anonymous

        >I write difficult to understand code, not because I am shit at writing code, but because I am superior in intelligence
        It is so transparent.

  25. 2 years ago
    Anonymous

    Created in California

  26. 2 years ago
    Anonymous

    [...]

    Black females always have an ugly gorilla face unless they are mixed

    • 2 years ago
      Anonymous

      The frick is wrong with you

      • 2 years ago
        Anonymous

        I cant believe heckin racism still exists in 2022

        • 2 years ago
          Anonymous

          its here and its in /misc/
          it is all americans. white americans.

          • 2 years ago
            Anonymous

            We need to kill them all for reparations

          • 2 years ago
            Anonymous

            putin will do it

        • 2 years ago
          Anonymous

          It don’t even have anything to do with the thread

  27. 2 years ago
    Anonymous

    because people don't know how to use it

  28. 2 years ago
    Anonymous

    It's cool if you have everything planned out before writing the code.
    Later adjustments in OOP are PURE HELL.

  29. 2 years ago
    Anonymous

    Human Black person
    Black person.iq = 65

    • 2 years ago
      Anonymous

      It should be

      Black person.getIQ(); // you get 65

  30. 2 years ago
    Anonymous

    why is name an object but email and address are properties

    • 2 years ago
      Anonymous

      why do you identify yourself with your name instead of your address?
      because your name is more consistent, and your address can change all the time

    • 2 years ago
      Anonymous

      trick question they're all String objects

  31. 2 years ago
    Anonymous

    Do people hate OOP or do they actually hate Java? Java has an extreme over-reliance on OOP to the point where 50% of your code is boilerplate.

    • 2 years ago
      Anonymous

      Before IQfy I hated OOP but now hate solely Java

      • 2 years ago
        Anonymous

        java. created for masochists by masochists.
        a worthy successor to 'C'

  32. 2 years ago
    Anonymous

    it's not, but if your language is based entirely on classes, as in no procedural functions unbound to a class, then it's a shit language. ironically, c++ got it right before java did, but nobody cared yet. every moron thought that java shit was the future, but now they are basically reverting back to c++ but better(GC, type safety, whatever)

  33. 2 years ago
    Anonymous

    What is Object Oriented programming?
    Genuinely: which of the supposed features of OOP are actually OOP:
    >encapsulation
    Modules provide this in non-OOP languages
    >polymorphism
    OOP only provides an extremely weak type of polymorphism called subtyping-polymorphism. parametric polymorphism is much more powerful. Java and C# have both implemented parametric polymorphism (called generics in Java/C#) and ad-hoc polymorphism (via interfaces), but those features came from the ML world.
    >data abstraction
    As anyone who has ever programmed in a non-OO language knows, this is not limited to OOP.
    >inheritance
    Actively discouraged by OOP-advocates ("composition over inheritance")
    >dynamic dispatch
    This really just amounts to first-class functions, popularized in the 1960s by lisp before simula
    >message passing
    This may characterize smalltalk, but is never used in popular OOP languages today except in the context of implementing parallelism

    So the question remains: what properties/features actually define OOP?

    • 2 years ago
      Anonymous

      OOP is a paradigm, not a "feature set"; you can't define it just by a list of features

      • 2 years ago
        Anonymous

        how is it defined then?
        I could define functional and procedural programming quite easily:
        functional: programming using function composition where definitions are referentially transparent and functions are first-class
        procedural: programming where series of computational steps are arranged into procedures which may called anywhere in the program, including recursively in the procedure definition
        why is object oriented programming so difficult to pin down and give a non-ambiguous definition?

        • 2 years ago
          Anonymous

          in principal, OOP is a paradigm where you define related state (as fields) and behavior (as methods) into classes, which you then can instantiate (as objects). then one object can interact with another object, e.g. instantiate a new one or call methods of another; and each object/instance, even of the same class, has its own private state

          the difficulty to define OOP in a generic, standalone manner probably comes from the fact that it's quite abstract by itself, so you would be heavily leaning to explaining by example or by comparison.
          OOP examples are pretty much always garbage, especially the "Dog extends Animal" example as it focuses only on inheritance, and is an example detached from programming (you don't program Dogs).
          if you were to compare it to procedural, then both are imperative (i.e. you define "how" to get your result, opposed to declarative where you define "what" you want as your result), but OOP has much tighter scoping of state and behavior, because each method or field belongs to a specific class (opposed to procedural where a function just "is" and you're not constrained in accessing it)

        • 2 years ago
          Anonymous

          both of your definitions are ambigious and / or wrong (FP doesn't need composition and PP doesn't need recursion)
          All these paradigms are ambigious, OOP just more so

          • 2 years ago
            Anonymous

            show me a non-trivial program written in functional style which is not compositional?
            even seemingly imperative let-bindings are disguised function composition.
            let x = f p in g x

            is equivalent to
            (x -> g x) (f p)

  34. 2 years ago
    Anonymous

    OOP isn't inherently bad, you can write obtuse code in any language. The problem is that bad programmers who are inevitably introduced to the paradigm will try and use it everywhere whether it's needed or not. You can find hefty tomes about what design patterns OOP enables and it's not always easy to explain that often the best way forward is to ignore them and keep it simple unless you have a real need to do so.

    • 2 years ago
      Anonymous

      you can write obtuse code if you are post 30 out of your shit sales career. trying to get in. and not having a fking clue what oo is. not having learnt the right way. having learnt the easy way. and you will never learn unless you learn the hard way, unless you go through the fricking mill. = processsing, seeing every line of code execute. doing it manually, in your head. idiots. losers. seeing sales people disintegrate because their fricked organisations implode, is funny.
      die.

  35. 2 years ago
    Anonymous

    Nope, it's great and should be used everywhere.

    All other paradigms lead to unmaintainable code.

  36. 2 years ago
    Anonymous

    > oop bad
    its bad cos failed brainlets (mainly infesting IQfy looking for clues) can't grasp the concepts behind it

  37. 2 years ago
    Anonymous

    according to the other thread I was in OOP isn't bad its just that it makes devs break up their code in a million places and spagettfiys it making it shit

    • 2 years ago
      Anonymous

      as long as you use an IDE (and you should), navigating split code is a cinch, and broken up code is actually much easier to read than 100+ LoC functions, which is the real spaghetti

    • 2 years ago
      Anonymous

      Broken code reduces coupling. You're literally forced to write code that doesn't break when when someone changes a variable somewhere.

  38. 2 years ago
    Anonymous

    >class: Human
    >objects: Name
    what

    • 2 years ago
      Anonymous

      Gotta pack things like pronouns somewhere

  39. 2 years ago
    Anonymous

    An example of exceptions being dumb in java would be that a java program always catches exceptions whether you program it to or not.

    Increasing the actual program complexity, and slowing the program down.

    • 2 years ago
      Anonymous

      Just don't write in Java if speed is an issue, bro.

    • 2 years ago
      Anonymous

      what
      you don't have to catch any exceptions in Java, you can instead just throw them further, even right up to and over the main() method

      you should catch exceptions only if you have good intent on handling them at that specific location in code, otherwise always throw

  40. 2 years ago
    Anonymous

    >objectifying women
    Sounds pretty based to me.

  41. 2 years ago
    Anonymous

    Things fall into multiple classes and it's hard to categorize.

    > Inb4 multiple inheritance

  42. 2 years ago
    Anonymous

    What is a "Human" class knowing anything about sending email?

  43. 2 years ago
    Anonymous

    I blame the Clean Code Cult.

    • 2 years ago
      Anonymous

      > I blame the Clean Code Cult.
      Random statement which makes very little sense.

    • 2 years ago
      Anonymous

      Sounds like something out of Twitter

  44. 2 years ago
    Anonymous

    I like OOP. I don't use inheritance at all.

  45. 2 years ago
    Anonymous

    Because its not FP

    • 2 years ago
      Anonymous

      FP is moronic, though.

    • 2 years ago
      Anonymous

      FP sucks

      t. worked at fintech company using F#, they all fricking hated it and did everything they could to get away from it.

      • 2 years ago
        Anonymous

        I've never seen people use F#, but the first reason it sucks (but might be useful for some) is .NET.

        What else went wrong?

        • 2 years ago
          Anonymous

          They were using F# for some things and C# for others. So littered throughout the C# code were these awkward fricking F# objects.

          Also most devs were C# devs including myself, we couldn't understand the F# code and didn't see the point in it anyway. It has very little industry adoption and dosent solve any problems C# can't also solve. Basically it's almost as useless to learn as some company specific DSL. That's the real problem with F#. Most people don't want to learn something semi useless.

  46. 2 years ago
    Anonymous

    help, where is the new class button in pyCharm

  47. 2 years ago
    Anonymous

    > Why is OOP bad?
    Depends. Most people will argue about inheritance, or dependency hell, or polymorphism, or whatever, but when it comes down to it, OOP's biggest issue is one of definitions. There are 100 mutually exclusive approaches to OOP, all of which competing to be "the real one." Its hard to talk about why "its" bad without defining which version(s) you're referring to.

  48. 2 years ago
    Anonymous

    This is the only article you'll ever need to read to debunk OOP. http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end

    Now sit back and watch morons squirm and foam at the mouth trying to badly refute it.

    • 2 years ago
      Anonymous

      404 bastard

      • 2 years ago
        Anonymous

        Horrible cope.

  49. 2 years ago
    Anonymous

    >read this complete strawman of an article
    >haha also it's unrefutable, good luck making any points against it
    you don't even deserve a (You)

  50. 2 years ago
    Anonymous

    oo is bad because brainlets
    people like erm 'bill gates' dont understand it
    so they therefore say it aint the true path
    if youwant to know what trying to do an OO system without oo looks like, look @ 'windows'
    gates aint smart. u dont have to be smart if you are 'privileged' you can be fking anything
    programmer. biochemist. pedophile. cuck

  51. 2 years ago
    Anonymous

    Oop is literally just putting structs and methods into smaller namespaces so the code is more human readable and errors are easier to find

    Thats it

  52. 2 years ago
    Anonymous

    The name is not an object of the human

    The name is a property of a exterior system, who gives that human a name.

    You could say that human has a self proclaimed name, then it belongs to him

    Humans don't have methods. A human can't send an email, it can interface with a computer to send an email

    The problem with OOP is that people think objects can do things (model), which is a lie. Objects do not do things, they do not have models, objects ARE things, and they can interface with other things to create something (which are systems of relationship of objects)

    The idea that objects have models is the most stupid decision ever and it ruins everything

    • 2 years ago
      Anonymous

      > are things
      state machines

  53. 2 years ago
    Anonymous

    >make a UI building block like a textbox
    >another one which displays pictures
    >99.99% of the code is the same (50000 lines)
    >make both inherit from some uiEement whatever base class
    Or
    >have some basic feature like a menu
    >use it in a different program
    >now it requires one thing to do something slightly different
    >make it a virtual function and override the behaviour

    This is how inheritance is used in the real world, and it is very handy
    The fact that so many people are so obsessed with college grad “class Dog : Animal” tier examples proves none of you have any work experience or do some archaic shit C or Delphi

    • 2 years ago
      Anonymous

      >inheritance based UI toolkits is the killer app of OOP
      Self pwn you love to see it.

      • 2 years ago
        Anonymous

        IDEs have created a generation of people who can't program

  54. 2 years ago
    Anonymous

    I like to do external polymorphism. It's non-intrusive as it doesn't force you to inherit from a base class or add member functions. As long as free function exists with the correct signature, you can store it as a polymorphic type (like rust's Box). You can also make your model implement a non owning polymorphic reference or use a small buffer to store the type inline instead of using unique_ptr.

    #include <iostream>
    #include <memory>
    #include <cmath>

    class Shape2D {
    struct concept_ {
    virtual ~concept_() = default;
    virtual double area_() const = 0;
    virtual const char* name_() const = 0;
    };

    template <typename T>
    struct model : concept_ {
    model(T&& val) : value(std::move(val)) {}

    double area_() const override { return area(value); }
    const char* name_() const override { return name(value); }
    T value;
    };

    public:
    template <typename T>
    Shape2D(T&& v) : self_(std::make_unique<model<T>>(std::move(v*~~ {}

    friend double area(const Shape2D& s) { return s.self_->area_(); }
    friend const char* name(const Shape2D& s) { return s.self_->name_(); }

    private:
    std::unique_ptr<concept_> self_;
    };

    struct Circle {
    double radius;
    };

    double area(const Circle& c) {
    return M_PI * c.radius * c.radius;
    }

    const char *name(const Circle&) {
    return "circle";
    }

    struct Rectangle {
    double w, h;
    };

    double area(const Rectangle& r) {
    return r.w * r.h;
    }

    const char *name(const Rectangle&) {
    return "rectangle";
    }

    // Not a template
    void print_shape(const Shape2D& s) {
    std::cout << name(s) << ": area = " << area(s) << 'n';
    }

    int main()
    {
    Shape2D s0(Circle{2.0});
    Shape2D s1 = std::move(s0);
    Shape2D s2(Rectangle{1.5, 4.0});

    print_shape(s1);
    print_shape(s2);
    }

  55. 2 years ago
    Anonymous

    It produces spaghetti code.

  56. 2 years ago
    Anonymous

    OOP is fine if it is the OOP invented in languages like Lisp and Smalltalk. Java is corpo bubble OOP which is a regression.

  57. 2 years ago
    Anonymous

    because they say so on IQfy

  58. 2 years ago
    Anonymous

    Class: Human
    Sorry, president Hitler declared blacks as non-human you have to refactor.

  59. 2 years ago
    Anonymous

    Based Java treating women as objects

    • 2 years ago
      Anonymous

      they're either objects or fricking evil over the hill b***hes.

  60. 2 years ago
    Anonymous

    >email is a property of human
    One of the fundamental issues with modern structure is it's misuse.

  61. 2 years ago
    Anonymous

    because i say so

  62. 2 years ago
    Anonymous

    What did you say about OOP?

  63. 2 years ago
    Anonymous

    [...]

    frick off
    or learn to program idiot

  64. 2 years ago
    Anonymous

    bump

  65. 2 years ago
    Anonymous

    class Flying
    class Walking
    class Bird inherits from Flying
    class Sparrow inherits from Bird
    class Ostrich inherits from Bird

    But Ostrich doesn't fly, Ostrich should inherit from bird, but not all birds fly. Do we have a class Flying and a class Walking, and have no class for Birds? All birds lay eggs, so how do we reuse egg-laying code for both Ostrich and sparrow, but not for Bats, which inherit from flying but are not birds and do not lay eggs?

    • 2 years ago
      Anonymous

      interface Flying
      interface Walking
      class Bird
      class Sparrow inherits from Bird, implements Flying and Walking
      class Ostrich inherits from Bird, implements Walking
      class Bat implements Flying

      • 2 years ago
        Anonymous

        Interfaces are neat, but they aren't sub typing polymorphism (aka OOP polymorphism), and come from functional programming, not from OOP: ad-hoc polymorphism was introduced by Wadler and Blott to Standard ML in 1989. So it's hard to argue they represent OOP. Sure OOP langaues have them, but Java also has anonymous functions and c# has list comprehensions, but it would be difficult to argue that these weren't functional features embedded in an OOP langauge.
        Also, why not make Bird an interface as well?
        Why not do away with class inheritance entirely, and have only standalone class definitions and interfaces like Haskell and Rust?
        Also, in haskell and Rust it's possible to do something like this
        interface EggLaying<T>
        interface Bird<T> where T implements EggLaying

        Requiring all types that implement Bird to also implement EggLaying. Is that possible with Java interfaces?

        • 2 years ago
          Anonymous

          >Also, why not make Bird an interface as well?
          Maybe it contains body parts that all birds have.

        • 2 years ago
          Anonymous

          interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface

          >Also, why not make Bird an interface as well?
          given no context what Bird's purpose is, it could be either interface or class
          it might, or might not, have fields reused in the classes extending it

          >Is that possible with Java interfaces?
          if you mean interfaces extending other interfaces, yes that's possible in Java
          for example https://docs.oracle.com/javase/8/docs/api/java/util/List.html

          • 2 years ago
            Anonymous

            >interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface
            You just described ad-hoc polymorphism.

          • 2 years ago
            Anonymous

            quickly reading up the definitions on wikipedia, no, it's not - the interface polymorphism comes from the other direction than what's described as "ad hoc polymorphism" (function/operator overloading)

    • 2 years ago
      Anonymous

      override void fly():
      return

  66. 2 years ago
    Anonymous

    >properties doesn't include float Black person 0.0-1.0
    Curious

  67. 2 years ago
    Anonymous

    OOPs
    I did it again
    Got lost in the game

    Oh baby oh baby

  68. 2 years ago
    Anonymous

    if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.

    • 2 years ago
      Anonymous

      >if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.
      I'm working on an Elixir project started by two morons and it's just as buggy, slow and nasty as any other codebase. FP doesn't protect you from shit code, no paradigm does.

  69. 2 years ago
    Anonymous

    >muh birds
    >muh person
    I wish colleges would stop doing this
    They are terrible examples

    • 2 years ago
      Anonymous

      The reason for these perverse examples is that graphs of objects is a better model for dogs and cats than it is for computations.

      • 2 years ago
        Anonymous

        OOP is not good for computations, they are there to make writing correct code easier

  70. 2 years ago
    Anonymous

    because it forces you into the "every program is just a database + interface" mentality.
    It makes you efficient at the cost of your creativity.

  71. 2 years ago
    Anonymous

    OOP as a set of features is useful and so are the basic principles of OOD (loose coupling, high cohesion). Some people worry too much about "correct" OO architectures rather than useful ones.

  72. 2 years ago
    Anonymous
    • 2 years ago
      Anonymous

      Name a language that is actually helping the industry.

      • 2 years ago
        Anonymous

        Rust

        • 2 years ago
          Anonymous

          Helping the industry by reducing the number of candidates you compete with for a job opening by 41%? that's actually pretty based

  73. 2 years ago
    Anonymous

    sfdgdfgsdfg, fgsdfgsdfg.

    > dfigojsdfgo isjfg

  74. 2 years ago
    Anonymous

    It's not, it's just misused

  75. 2 years ago
    Anonymous

    >inheritance is bad
    >frameworks are good
    same thing conceptually, morons. Reminder 90% of "developers" are awful at their jobs and are the equivalent of 1950's typists that just copy/paste code and don't actually design anything

  76. 2 years ago
    Anonymous

    Based computer science recognizes that women are objects.

  77. 2 years ago
    Anonymous

    It's not inherently bad, it just ends up being the goto solution in cases where it really doesn't need to be.

  78. 2 years ago
    Anonymous

    OOP is the best way to group methods together which operate on the same data.

  79. 2 years ago
    Anonymous

    >Methods
    Cook
    Clean

  80. 2 years ago
    Anonymous

    SKIN: BLACK

  81. 2 years ago
    Anonymous

    because brainlets can't into it without writing shit code
    /thread

Your email address will not be published. Required fields are marked *