(((Object-oriented programming)))

>(((Object-oriented programming)))

The best thing about OOP is that it encourages decent code organization. It's hard enough to get nicely commented code, but with OOP at least you can sort of orient yourself with other people's code.

>spaghetti code is organized
You might as well be using fucking BASIC with tons of GOTOs when you use OO. There is no concept of code flow or organization with OO.

OO is fucking stupid.

>le anti OOP meme
Cite me a better way to represent compound data units that can't be easily represented mathematically.
Let me help you out: You can't.

not him but plain old s-expressions are pretty solid

OOP isn't actually programming, its data entry

>design a paradigm to force lazy programmers into structured thinking
>plan backfires and requires even more skilled programmers to maintain the new convoluted structures

component oriented programming

>data units that can't be easily represented mathematically

no one cares if it isn't "easy" for you to represent them mathematically, they need to be be done as such anyway, any other way is laziness and your system is going to suffer at some point because of it, if you can't deal with that you shouldn't be anywhere near a codebase

why is Sup Forums so consistently hipster
it's embarrassing

inheritance trees are stupid, but objects aren't.

And what the hell do you think those components use to communicate with other components?
I'm not denying that OOP has reached a point of unforgivable terribleness. I'm pointing out that so far, there isn't a solid way to represent abstractions that conforms nicely with human logic.

Okay then. Can you describe a mathematical function that can differentiate between a boat and a road vehicle?

Fine.
Go back to your C/Assembly lair full of GOTOs, switches and thousands lines long functions.

Such as? Never met a codebase that couldn't be unfucked from the OOP shittiness into data flow. It's not that hard, OOP brainlets, it's all about data transforms.

Let f be the function such that f(x) = 1 if x is a boat and f(x) = 0 if x is a road vehicle.

>willfully complicating the implementation because of "muh math purity" autism
No, you're the one that shouldn't be anywhere near a codebase. Keep it simple or die.

boolean flags. now distinguish between 4 boats. hey, just add a flag. this is some nice clean code right here. boolean flags for everyone!

>it encourages decent code organization.
It does the exact opposite, it allows people to write convoluted and unmaintainable code because it's designed to protect idiots from themselves at all costs.

See

...

>tfw such a massive brainlet that building a literal switch statement seems like a good alternative to objects
It's time to go back to school and get a real degree, pajeet.

can do with both interface and reflection

Nice. So you're gonna start passing strings around to represent vehicles now?

Gee, I wonder how you're going to represent all that data without some sort of objects, or functions that are oriented towards transforming said objects...

Really the only thing that is majorly bad about OOP is using inheritance. If you don't use that, and still think it can be called OOP, then OOP is good, and the term doesn't even mean much. Even better, stop putting functions into objects to operate on "this"/"self", and you're golden. But that certainly doesn't sound like OOP, it's just programming and also using objects. What does OOP mean anyway?

Basically what this guy said

I agree with what you're saying (not OP). As for a solution? Objects/functions are by definition the best way for humans to abstract static concepts and processes that can be called and used using the "building block" mentality. I think the flaws show in its current state of application. I think a means of being less amboliguous with them and their features is the fix. We need to stop thinking of OOP as a shortcut and realize ot CAN be a powerful tool if said objects are constructed with proper care.

>We need to stop thinking of OOP as a shortcut and realize ot CAN be a powerful tool if said objects are constructed with proper care.
Pretty much. We need a functional styled approach to OOP. IIRC most OOP languages are adding stuff like Lambdas now, though lagging behind on it more often than not.

>I think the flaws show in its current state of application.
This really is a problem. In my opinion, unless you're trying to build a language from scratch, 3 layers of inheritance at most should be the gold standard:

Abstract

OOP isn't about *some* sort of objects or functions. It's about organizing those in certain way you retard. Is procedural paradigm OOP too because you have data and functions of that data? I don't have a problem with collections of data and functions. I have a problem with how horrendous structures OOP encourages.
When designing from data flow, it's extremely simple to follow the code and,more importantly *prove* certain properties. You just don't have that with OOP because that shit can't be mathematically modeled.

And who said you can't combine FP with OOP?

>IIRC most OOP languages are adding stuff like Lambdas now, though lagging behind on it more often than not.

C++ added decltype() and auto in a really hamfisted manner, proving once and for all that Java being #1 in verbosity/unreadability is a meme perpetuated by people who know nothing about either.

Like I said , I agree that it should be, at least for certain applications.
Yeah fuck C++'s current state. I know Java added lambdas with JavaFX/Java8, but I'm not sure how well they were implemented.

What's hamfisted in C++ auto?

template auto getIntHash(int (*func)(T&), T& arg) -> int
{
return func(arg);
}

The key part of OOP isn't object, it's oriented. The confusing metaphors that turn code into an unstructured blob. Languages Lisp and Ada have objects without OO, and in some languages that allow for OO like Common Lisp and Python, you're perfectly free to write correct code without a single OO idiom; you're simply building your own data structures.

You've never worked on code that was originally written by Indians, have you?

nobody can tell you why oop is supposedly bad, they just meme about it.

>I know Java added lambdas with JavaFX/Java8, but I'm not sure how well they were implemented.
The only experience I have is with lambda's is with Java. What features should it have?

I love Java as a language but everything around is terrible. The users, the libraries, the standards. Like someone thought really well about designing it but someone else came along and shat all over it.

Its more just how they run as opposed to features

What the fuck is this dude saying?

what about ECS ?

>nobody can tell you why oop is supposedly bad
Except, you know, everyone else in this thread.

The concept is great but it is a pain in the ass to work with it at the code level. It's great in games when you have an "entity editor" of sorts where you can just drag and drop components.

kek so much this

anyone who grasps the concept of OOP can write organized code in C. It's the 90% of people that don't get it that are writing shit tier maintainable java.

This is a categorization problem

I run into it when I'm trying to sort images I save into various folders. Sometimes an image would qualify for more than one category. So I end up with an image that might go in Science Fiction > Character Art, but could also qualify for Science Fiction > Mecha

So, what, do you just put it in both, in one?

The best solution I've seen is how the booru's do it. You tag the image with metadata: Character, Robot, Mecha, Science Fiction, etc. etc. and when you want mecha pictures, you just type the keyword and get them.

I don't know anything about programming but why not do the same thing instead of OOP?