Redpill me on OOP

Is it a meme or not?

Other urls found in this thread:

youtube.com/watch?v=QM1iUe6IofM

If using a multi-core, multi-threaded, RISC based proccessors it's the future. If using single threaded applications on CISC or (((modern))) risc then it's a meme.

Depends what for. If you do it right it's useful, but if your code is abstractions all the way down you're misusing it.

Static typing is why OOP is bad. Anyone who says Staticaly typed OOP languages are good are sepples and java drones who can't program

there is nothing wrong with using zero cost abstractions though

Rust XDDDD

YASSSSS

This is like saying screwdrivers are a bad tool just because you tried to replace every other tool with it and ended up with a mess.

Not a meme, and not a panacea. The canonical example of where OOP is a great fit is in a GUI.

Is that why the GUI programs that we use today, X and win32 , are procedural? I have literally never seen or programmed a GUI with oop.

See

What is Qt?

shit

Shit that hasn't been touched by (((them))) cianiggers/redhat yet. Use it more faggot.

Not an argument.

Qt is a bloated mess that tries to reimplement everything.
If you just need some windows and widgets use FLTK which is far better.

FLTK is great for anything except wayland. You want wayland if you want moderately better desktop enviroment security then X or if you are stupid enough to use windows.

Use QT if you are a idiot trying to make a GUI for wayland based DE's. FLTK seems signifigantly better for anything else.

That's still not an argument.

I'll just post this, the guy explains well.

youtube.com/watch?v=QM1iUe6IofM

FLTK looks like 💩

OOP tried to make what we already do in C look more natural but fucked it up. Intrusive datastructures melded naturally in C but feel like huge, fragile hacks in OOP, so much so that programmers choose slow bloat just to keep the code looking OOPy. Shortened namespaces failed due to issues with upgrades and namespace pollution and actually made things worse. And there are plenty of functions like operators and casts that stayed traditionally procedural to where you're often searching for 'function that takes this type' anyway.
OOP was a mistake.

6/10, some effort at larping

If you over do it it can be a huge mess but sometimes it helps a lot with readability.

You'll know something is wrong if you make a class called Manager. Classes should always reflect something you can name in real ife - objects or things. Otherwise break it up into functions.

OOP is a great way to organize code, especially domain models. It gets ugly when proper patterns aren't followed or are misused, or when frameworks have to be used in order to leverage the language with OOP in a sane way, e.g. Java Spring. As another commenter said, statically typed languages are not a natural fit for OOP patterns.

How do you do interfaces without OOP? How can you say, "this datatype must have a method that does X" and have polymorphism on it? Shared attributes? Function pointers in the datastructure?

It's a tool, like all other programming tools. There is a time and a place for it, and there is a time and place to avoid it. It's a useful abstraction when most or all of your datastructures can be abstracted into nouns, or when you need distinct datatypes to use a lot of common functionality while overriding or changing specific behaviors.
Exceptions and OOP aren't the same thing. OOP doesn't require factories (even in Java, it's just most-commonly abused there). It's as easy to make terrible dependency graphs and spaghetti code with OOP as it is without it.
OOP evangelists are faggots. OOP haters are faggots. It's a tool; use it when appropriate and avoid it otherwise. There's really little else to discuss. When people think they are shitting on OOP, more often than not they're actually just shitting on Java.

Yeah, I know I'm a centrist fence-sitting faggot. This is programming, not politics, so you can go eat a dick if you've got a problem with moderation in this field.

It's up to who is doing it. Usually datatypes don't "have methods", and everything that needs to act on them is done via function pointers. Look at how most C interfaces are defined.

First and foremost, politics is shit, infinitely more so OTI. But you cease this autism right this fucking once. Not being a Koko-tier memespouting socialist subhuman piece of shit is a good thing.

Java isn't even a good example of a statically-typed language, my sweet sweet mentally retarded friend.

second order lambda calculus, aka polymorphism.

polymorphism isn't exclusive to OOP. any functional language with data structures and polymorphism will do exactly what you want.

Java is not statically typed?

You can't read?