Is object oriented programming a meme?
Is object oriented programming a meme?
Other urls found in this thread:
no
-you can get a six figure salary with it
-these langs currently run the internet
-only vocal 80s unix turds and hipster lang cs dropouts give a shit about 5 bytes of memory lost
maybe
yes
interfaces are also a meme
> makes code readability hard as fuck.
> one new class will KILL the hirarchy.
> 5 instances of superclass just to interact with all the subclasses.
> 5 bytes. More like 16 MB
great meme.
>16 WHOLE MB
Really makes you think
even function pointers are a meme
yes, it's designed so that pajeet can work on big projects and not fuck everything up
programming is a meme.
>one new class will KILL the hirarchy.
Then you're doing it wrong.
OOP is the only way to get
>polymorphism
>code reuse
>API export items where the compiler enforces what you specify
It is more expressive than all other forms of programming, an example is the switch statement, it's no longer needed in OOP, instead you make a class hierarchy for the different cases and implement the branches as methods
It is the cleanest and most elegant solution to lost of typical programming problems.
>
>what is functional programming
I like the Python approach of both all-out classes but also many plain functions.
Object Oriented Design is a meme forced by people in suits with little in interest for good software.
For real, what is it and why it's better than OOP?
> what are java 8 lambdas
Pft. Stop playing with your toy languages like Haskell and C and come get some work done.
Please refer to this video for an example.
youtube.com
Kindly fuck off
Go back to school
So functional programming is just a meme to distract younglings to get real jobs with OOP...
All right...
It's an esoteric programming paradigm.
fuck off
code should be very simple readable and fast
lot of OOP projects follow various wild design patterns resulting in exact opposite
>obviously the dog's gonna talk
He was presenting a counter argument to your statement thus proving you assertion that OOP was the only way to get
>polymorphism
>code reuse
>API export items where the compiler enforces what you specify
wrong
To be fair, this is why modelling things as complex as the entire animal kingdom is pretty difficult. You only add in what you need - if your program isn't designed to simulate the effects of pissing whilst eating, you probably don't need either method.
I can tell you're a Linux user because, if you have to ask, you probably only use command line tools and have never used a high-end application in the past.
>instead you make a class hierarchy for the different cases and implement the branches as methods
That sounds like a really complicated way to check if the user input "y" or "n".
I'm a windows user and I don't even know what object oriented means
fpbp
/thread
>-you can get a six figure salary with it
not bloody likely though
>-these langs currently run the internet
they run server side apps. pretty much anything that actually "runs the web" (linux, apache, nginx, etc) is C.
>-only vocal 80s unix turds and hipster lang cs dropouts give a shit about 5 bytes of memory lost
all programmers care about form and well-architectured projects.
OOP isn't bad if you do it right but most devs seem to start with the notion that it's automatically better and end up with ugly over-engineered shit trying to force their favorite solution to every single problem.
>Go back to school
not everybody studied CS in Europe.
all over North America, enterprise OOP shit is what they teach. I get furious when I hear my French bud talk about his OcaML assignments.
OOP is really good way of breaking a large application into independent, logical parts that can be assigned to different developers or developer teams. It also has some useful traits for simulations or game developement.
Seconded
Or maybe you model it properly instead of forcing OOP to model behaviors.
Behavior and OOP are two different shit, get used to it and you will be better at modeling.
Don't just model parts like that.
One somewhat shitty solution is that the head or a behavior component in this case because idk why there is a head should know what commands it can execute.
Actually the behavior component or, if we stay at the head/leg/body example, the body parts can implement the ones they are capable of (whether this is implemented as class is irrelevant) performing. This gets propagated to human/cat/etc. and later this can be queried through an interface. Basically for example human can give back the list of commands it is capable of executing which is an aggregation of commands from it's parts. A specific command can be given back by human.
Like:
cmd = humanInstanceXYZ.requestCommand(Commands.TalkCommand);
cmd.say ("Fuck you Cred Forums!"); // This makes XYZ human say the string.
It doesn't even need a common class for behavior, but it needs a common class for handling commands in a generic way.
Now this is a framework for handling commands in a certain way. Might not the best depending on the requirements, but it's one way.
I forgot to say that I generally agree with you. I just meant this as an example regarding that shitty image. You're right that you should only model what you need and get a proper framework to work with within those constraints.
Anything is a meme if you say it loud enough on Cred Forums
Also, wait for quantum computing and every line of codes will be outdated
It's threads like these that remind me that Cred Forums is full of retards spouting off about things they know nothing about.
You are a meme.
>leggable
>fleable
kek
always gets me
>switch considered harmful
weak bait
Obviously not.
There are cases where it's crowbarred in where it has no business being used but that doesn't make it a meme.
I personally avoid it wherever possible but I almost exclusively use R these days and a functional style makes more sense.
An example of OOP done incorrectly. Inheritance is not about subtyping.
OOP might be good for some problems. Purely functional might be good for some problems. In reality though majority of programmers work on websites these day and want to pretend that they work at nasa. Procedural or bust. If you can't write or read good procedural code you shouldn't be a professional programmer.
>what is unemployment?
>Subhuman : fleas = 14;
this is still too good