Object oriented programming sucks

Object oriented programming sucks.

Attached: 20181207_163143.jpg (2976x2976, 1.08M)

why would i do
class object
{
{ data }
function do_thing();
}

when i can do
struct object
{
{ data }
}
function do_thing(object);

Keeps your code clean?

if you define "code" as only the parts that you see in your source, then sure i guess
but even then, are you really?
its still the same amount of stuff, and if you keep a convention of where you put related structs and functions then its still just as organized

>Object oriented programming socks.
Fixed

If that's what OOP means to you, it's easy to see why you don't understand its purpose.

Object oriented programming socks.

really, what difference in "cleanliness" is there here?
// ex_one.txt
#include
class object
{
{ data }
function construct(args);
function a();
function b(args)l
}

// ex_two.txt
#include
struct object
{
{ data }
}
function construct(object, args);
function a(object);
function b(object, args);


you pass one fewer parameter to functions?
dont think thats worth it, sorry

you can give me textbook definitions of four pillars blah blah blah all day, in the field all you get is a hipster implementation of ex_two.txt and often a chain of inheritance trees where you, as they say, "want the banana, but end up getting the banana, the monkey, and the whole damn jungle"

Not even a but after reading your post id say:

what is the purpose then. Lay it out for me.

actually, now that i think about it, there is no difference between the two as far as typing is concerned
whats the difference between
object.b(args);
and
b(object,args);
you type a comma instead of a period
thats it

You do know that struct and class both can have methods, right? There is literally no difference between them except for default member access.

in reality it's usually the difference between
list.Add(object)
and
AddList(list,object)
so you're saving a word

OO is defined by inheritance, encapsulation, and polymorphism, not classes.

well, you can put function pointers in a struct in c, but you cant declare a function within one
i think you can do that in c++, but if you can then structs are implemented differently and you might as well use a class at that point anyway

>inheritance
overbloated and unnecessary file dependencies
>encapsulation
trying to idiot-proof your code means you have idiots working on it and your project is doomed to failure anyway
>polymorphism
the most efficient way to destroy your code maintainability

I was talking about C++ obviously since C has no classes. In C++ class and struct are identical except that a struct has public as default member access and class has private. Both can inherit, have methods, etc. They can even inherit eachother.

Because now you have to make functions for every type of struct they may share that functionality or dive into void pointer nonsense.

Do string manipulation in C and harness the fuckery that 'a word' causes

professional fizzbuzzer detected

well there you go
no sense using language-specific features in pseudocode unless necessary for the demonstration

void pointer nonsense is what happens in the background anyway
its also how inheritance is actually implemented, if you really want to use inheritance

>f-f-fizzbuzz! fizzbuzz i tells ya!

Yikes, imagine actually believing this

yikes, imagine not providing any evidence of object oriented programming principles bringing tangible benefits to a project despite them being so widely acclaimed and supported everywhere

seriously, you fuckers are like religious zealots
if my claims are wrong, refute them
if there really are benefits to developing software using object-oriented programming principles, provide some evidence
and no, just like religion, a large amount of people believing something does not magically make it undeniable fact

if you can't see the benefits of polymorphism you've never written a real program

>void pointer nonsense is what happens in the background anyway
not at all
>its also how inheritance is actually implemented
false
now go kys and stop shitting the board

how so?
how many polymorphics operating system kernels are there?
device drivers?
what about mission critical software in transportation, medicine, and warfare?

>how many polymorphics operating system kernels are there?
probably all of them, they just don't use OOP for it
device drivers and low level programs don't need it
It's like you think all programs should be judged to the standard of one field of programming

Attached: 1531611388956.jpg (667x900, 287K)

It's important to remember there are more readers than writers. Just because everyone says dumb shit doesn't mean everyone here is dumb.
Those that know OOP is bad don't have to say anything, we already know it's bad.

The SQLite database is written in C in OOP-style.

my point is, "important" software is almost never written to comply with "the principles of object-oriented programming"
they may use one mechanism if they feel that it brings a tangible benefit to their particular project, but thats it - and they usually don't even use "object oriented" languages to do it
ALL software should be designed and written as if it were "important" software
there is no "well, its not like we are writing a kernel or something, we shouldnt try THAT hard"
all software should be held to the standards of mission critical software, especially since it may one day BECOME mission critical software

i look around at all the shitware that gets thrown out into the wild and i just think "please for the love of god, somebody tell them"

>my point is, "important" software is almost never written to comply with "the principles of object-oriented programming"
It is. All the fucking time. Just not low level software like drivers, which have a very clearly defined problem space, inputs, outputs, memory and logic. Very important business software uses OOP all the time. Thinking all software in every field should be written in the same way only demonstrates how stupid and narrow-minded you are. If all software was held to the standard of "mission ciritual" software, it would take ten times longer to come out, often to the benefit of absolutely nobody

>If all software was held to the standard of "mission ciritual" software, it would take ten times longer to come out, often to the benefit of absolutely nobody
Talk about narrow minded thinking.
In no way does mission critical imply longer development time. Especially today.

im not even really that vehemently "anti-oop"
i use some of the "principles" in my own projects
half of my presented arguments here come from a mindset of "come on, refute me. show me that you know what you are talking about. show me that you arent just mindlessly following your intro to programming textbook like its a bible"
but very few are even trying
come on, people
have you actually thought about any of this for yourselves? do you actually understand enough about the principles to refute claims against them demonstrably?
knows what's up
there are people out there that know what they are doing and use some of the principles to produce good software
... do you each of you actually think you are one of them? because from what i can see, largely no.
you are not

jesus fucking christ my hope for humanity lowers by the day

Parametric polymorphism in functional programming > inheritance in OOP

>In no way does mission critical imply longer development time
If by mission critical you mean low level software which drives hardware, which doesn't use OOP or many abstractions, then it does, that sort of software doesn't need abstraction because the problem space is very clearly defined - If you're writing software software, like for business or web or games, the problem is not clearly defined at all, the code needs room to grow and expand and change, that's why these abstractions exist. They help you write code that can change dramatically over time without the whole thing falling apart.

Attached: 1515803752031.gif (202x360, 1.84M)

I don't know what point you're trying to make. You act as if abstractions are somehow mutually exclusive.
As if we don't have decades of tools built around this.

I don't know what point you're trying to make
Saying that we don't need high level abstractions because low level code doesn't need it is a dumb thing to say
Different fields have different best practises

You're assuming I'm someone else.

>all software should be held to the standards of mission critical software, especially since it may one day BECOME mission critical software
That's where you're wrong.

perhaps you should read the reply chain then
Guy says we don't need OOP because device drivers don't need it

Nice legs, can I suck your dick?

>ALL software should be designed and written as if it were "important" software
People need to apply this generally. Why half ass anything? I see the phrase "technical debt" more than anything else. Had people just done it right the first time it may have taken slightly longer but you won't pay for it later.

I'm not going to pretend like it wasn't my fault for butting in. I'm also going to contradict myself.

>People need to apply this generally. Why half ass anything?
It's not a question of half-assing things, it's a question of practicality. A program delivered in 5 years may have alot less value than a program delivered in 1, even if it might be more efficient and more stable

Engineering is about trade-offs in quality, schedule and cost, based upon a set of requirements.
You are not going to spend hundreds of thousands formally verifying a CRUD webapp, while you might do it for an engine ECU.

it seems like you care too much for its principles instead of thinking of oop and other shit as tools that you use to get your job done.

>feminen dick

kys

It's way too big lol

Do elaborate, comrade.

you might be retarded.

Post legs and feet user. I’m ready to jerk off to a cute trap.

Would gladly suck it knowing that but I’m gonna fuck you and when I do I’ll probably be calling you a faggot. Sorry, it’s what I’m into. If you were a real girl I’d probably call you a slut though so don’t get too offended.

Really insightful commentary. I truly understand the advantages of OOP after reading this. The way you delved into the intricacies of specific languages in particular.

What a fucking useless, masturbatory post. You're so much smarter than everyone else, amazing. Here's your attention, thanks for shitting up the board.

you might be retarded

Yeah

I've got a fancy degree, worked with OOP for years and want to call you an idiot. But there's too much truth to what you saying to do that without feeling like an idiot myself.

OOP is POOP but I actually prefer the top.

Honest opinion of my bulge?

Attached: 20181208_160803.jpg (2976x2976, 1.16M)

you are retarded

Because polymorphism and encapsulation are nice.