If OOP is so bad, then why does everyone still use it for everything?OOP and modern software are synonymous.
yes, because anything that is popular and mainstream can't be bad. python for example is a fantastic language for serious programmers
>>108234442But... it is? Python is god-tier for anything that isn't performance-heavy.
>>108234445that's why it's widely used everywhere!need something faster? just use rust!
>>108234450I can't tell if you're serious or not.OOP and Python are good for creating boilerplate-light and non-verbose code.
Autists can only think in singular objects, that's why. That's also why modern software sucks - because it's not written for the hardware in question, but for the mental model of those who should've never been allowed into the profession in the first place.
>>108234485OOP mental gymnastics,>A car is an object made out of steel, a license plate and seats that moves.ECS mental gymnastics,>something has a transform component>something has a velocity component>something has a steel framework component>something has a seat component>something has a license plate component>a car? what the fuck is that?
>>108234407OOP is POO in SpanishThat's why. It's specifically designed for POOjeets.
>>108234507Thanks for proving my point.
>>108234518I don't have autism, so I guess that proves MY point? Ask a normie whether they find OOP or ECS more intuitive and they'll say OOP every time.Steve Jobs famously credited OOP as a revolution in programming that made development 5 times faster.
>>108234534>I don't have autismYou should get a second or even third opinion then. Every non-autistic programmer would know about SIMD instructions and how operating on singular objects yields garbage code.
>>108234534Oh, also:>that made development 5 times fasterFast forward thirty years, at the end of Moore's Law, and we're looking at unmaintainable software and such fucked-up memory management that you need constructors and destructors.If you prefer that, then you deserve the current programming landscape.
>>108234457>OOP and Python are good for creating boilerplate-light and non-verbose code.bait or mental retardation. call it
>>108234407Okay, I will tell you why.Back in the 90's, Shekelstein saw that the Internet was getting fast."Oyvey", he said, "we can hire Pajeets for a FRACTION of the cost of an American and they can do the job just as well; Glory to the state of Israel!"But then Shekelstein realized "SHIT! Pajeets are fucking DUMBFUCKS! They are afraid of pointers!""I know!", Shekelstein said, "I will design a language where everything has to be modeled like a concrete object because Pajeet doesn't have reasoning skills beyond a K9 American! That way, we can have a White GOY from the North design the whole software as a "Class Hierarchy" so he gets his rocks off about racial superiority, ship it off over the Internet to the Pajeets who can manufacture it for ultrapennies on the dollar, then send it to us. Brilliant!", Shekelstein said while laughing his way to the bank.That's why Object Orientation exists.
a=:1.2.3_+4.5.6;so much fun.
>>108234407>If OOP is so bad, then why does everyone still use it for everything?One of the things that make it bad is the way its proponents have failed to define a concrete and feasible design methodology, so they've reverted to "if you have functions that do things on structs, you're using OOP".
>>108234507>topThe way street shitters think car manufacturers think about cars>bottomThe way car manufacturers think about cars.
>>108234407>screwdriver is a great tool we need to use it on everythingthis is how retarded people think
>>108234507that's exactly the issue, you're not describing a car to a person, you're describing it to a computer, self proclaimed programmers will insist that its better to make computers think like us instead of programming them in a way that works better for them.
>>108234688Neither representation of a car "works better" for a computer
>>108234705>he doesn't know how processors work
>>108234712Processors don't understand objects or components, nothing in that post has anything to do with how it is represented to a computer and everything to do with how it is represented to a human
>>108234720do you even know anything at all about ECS? or are you just here to shitpost?
>>108234688
>>108234720Holy shit, go read Agner Fog's PDF about optimizing assembly.
>>108234705if you have a million different cars with a bunch of properties of different sizes that are used in different places, it's better to store them by property than by the entire object. So you don't have to load the car plate, wheel radius, engine model, gasoline tank, owner, number of seats, color and weight when you just want to change the X and Y position of every car.
>>108234735>do you even know anything at all about ECS?Yes>>108234739>if you have a million different cars with a bunch of properties of different sizes that are used in different places, it's better to store them by property than by the entire object.That depends entirely on the access pattern
>>108234749>That depends entirely on the access patternYeah, the access pattern is "bunch of read-only data with some read-write data in it". There is no reason to mix the two.
>>108234762No it depends what fields your procedure is accessingIf you're sorting cars and you need to look at every field, it's better to have an array of structsIf you're just changing a single field, it's better to have a struct of arraysYou can't generalize and say one is always better than the other
>>108234407>>108234442You people will make console wars out of anythingYou're literally unemployed
>>108234769>If you're just changing a single fieldYeah, because you only ever change a single field. Because that's how things work.
>>108234776Is that sarcasm?
>>108234779Couldn't possibly.
>>108234485>Autists can only think in singular objects, that's why.ah, the cnile cope of the month repeated yet again>That's also why modern software sucks - because it's not written for the hardware in question, but for the mental model of those who should've never been allowed into the profession in the first place.the real problem is that cniles are incapable of any abstract thought, thus they can't solve any real problems beyond some simple, low-level stuff; while functards are stuck in useless academic wankery and can't solve any practical problem whatsoever.
>>108234782Some procedures operate on one or a few fields and are better for SoASome procedures operate on more fields and are better for AoSSaying you only ever do one or the other just demonstrates complete and utter ignorance of programming, if you think you only ever do update operations on individual fields I assume the only programming you've ever done is simple database queries
>>108234553>we're looking at unmaintainable software legacy OOP codebases, no matter how dire their state, are still leagues more maintainable than any comparable procedural cnile codebasethough this assumes the codebase is actually object-oriented and not just written in an OOP language but with a procedural approach>and such fucked-up memory management that you need constructors and destructors.Java does not have this problem
>>108234749in one situation you have all the X and Y positions stored side by side, in the other you have all the information about the car side by side, and if you just need one property you need to load everything in together. Sure, it depends on what you're doing, maybe you need all the properties, so it makes sense to group them together, but making an object and sticking everything in there regardless of its being used or not it will be a lot less efficient.
>ITT: low IQ people with no capacity for abstract thought "argue" about slogans and ideologies.You realize there's nothing stopping you from storing entity components in arrays, for the benefit of processing that only cares about those components, but also mapping elements from different arrays into bundles, for the benefit of entity-level logic... right, anon?
>>108234623>its proponents have failed to define a concrete and feasible design methodology, so they've reverted to "if you have functions that do things on structs, you're using OOP".never seen actual OOP proponents use that definition. if anything, it's either opponents or people neutral to OOP that use that line of reasoning, usually as a strawman for blaming OOP for non-inherent problems
>>108234802I'd say for general purpose programming most of the time you're dealing with several fields at once so objects / AoS are a sane default and you can change your program to SoA if you need more performanceSoA is generally more constrained and harder to work with too
It's bad because of the risk of over-abstraction and the fact that biding data to functions reduces code reuse.Your shitty Cnile scripts are still much worse than any good OOP code.
>>108234507top
>>108234813>never seen actual OOP proponents use that definitionThat's because you're 70 IQ. OP does that. You probably agree with OP.
>>108234507bottomjava does both
>>108234833>IQ projectionok Ramesh
>>108234847he's right though, you either didn't read the OP or you lack basic reading comprehension
>>108234969point out what I've miscomprehended
>>108234829>It's bad because of the risk of over-abstractionyou can refactor and un-abstract code>biding data to functions reduces code reuseyou're meant to bind state and behavior, not datadata is just what your program processes during runtime
>>108235041do you think op is anti-oop? because he's clearly doing the "oop = structs+functions" routine. everyone clearly does not use pic related for everything
>he hasn't taken the FPpill yet
>>108235178>do you think op is anti-oop?feel free to point out where my post relates to OP directly and not a reply to italso, you ask this only after you've already made your assertion but got called out on it?>because he's clearly doing the "oop = structs+functions" routinehow did you get this conclusion just from OP's post?
>>108234813>if you have functions that do things on structs, you're using OOPare they wrong?
>>108236426you can use "functions that do things on structs" to describe typical C codeis C OOP?
>>108236926i guess what I am asking is: am I using OOP if I use classes? because they're fundamentally the same thing as using functions to manipulate structs in C.
>>108234407They know that OOP was not ideal for all software programs back then.>A major contribution to structured programming was made by David Parnas in 1972 with the concept of information hiding, and at the same time by Barbara Liskov with the concept of abstract data types. Both concepts embody the notion of breaking up large systems into parts called modules, and clearly defining their interfaces. If module A uses (or imports) module B, then A is called a client of B. The designer of A then need not know the details, the functioning of B, but only the properties as stated by its interface.>As the demand for ever more complex software persistently grew, and as the difficulties became more menacing, illustrated by some spectacular failures (of which the most conspicuous was the crash of a rocket that abruptly ended a space mission), the search for panaceas began. Many cures were offered, sold, and soon forgotten. One of them, however, proved fruitful and has survived: object-oriented programming (OO).>[...] A discrete-event system consists of actors (processes) that come and go, that pass phases in their lifetime, and that carry a set of private data representing their current state. It proved natural to think of such actors with state as a unit, as an object.Some programming languages were designed on the basis of this model, their ancestor being Ole-Johan Dahl and Kristen Nygaard’s Simula in 1965. But such languages remained confined to the field of simulation of discrete-event systems. Only after the emergence of powerful personal computers did the OO model gain wider acceptance.>Object orientation became both a trend and a buzzword. Indeed, choosing the right model for an application is important. Nevertheless, OO is not appropriate for all applications.
>>108234407why do you continue to buy the shitty products you keep complaining about?enterprise software is OOP because it inflates the price and lets you throw buzzwords at clueless investors, that's all it is.
>>108234534and software 50 times worse, but next gen hardware will fix it.
>>108237005just putting something inside a class doesn't make it OOP>they're fundamentally the same thing as using functions to manipulate structs in Cclasses do not define behavior like functions do
>>108237483... *but it never has*.
>>108237483>and software 50 times worse, but next gen hardware will fix it.You can blame Alan Kay for this, but not because of OOP. He specifically promoted the concept that many developers live by:>He believed that by investing in future hardware capabilities, even if they weren’t yet available, teams could design and test software as if it were already running on that advanced system. This allowed developers to create applications and systems that were ten years ahead of their time, without being constrained by current limitations.Every developer who goes out and buys a top spec M5 to code on is making unusably slow software... because it only works on top spec hardware. Conversely every freetard still developing linux kernel on a 2008 C2D is out there blocking this sort of shit and keeping FOSS fast. It's possible to write a performant cross platform Java Swing app these days, but fags carrying MacBooks are going to ship shit in Electron anyway.
>>108234485Kek FPoids truly believe that files full of static function Defs are different to classes full of static and stateful members.If you're following proper FP practices the memory consumption is significantly higher and if you're not following proper FP practices and you're mutating m you're just writing classes with extra steps
>>108234485It's more accurate to say different people have different mental models for things. People debating the merits of OOP and ECS are ignoring that elephant in the room. It's like forcing a left handed person to be right handed and vice versa.
>>108234407Skill issue. Most retards out there are completely unable to use a tool the right way and then they blame the tool. They are so stupid they try to use a hammer as a saw.
>>108239977>files full of static function Defs are different to classes full of static and stateful membersSurely you have assembly output to back up your claims?
>>108234407oop is bad because thats the sound you make when you fuck up
who says its bad? that retard in red shirt?ECS can be designed inside of OOP, they dont replace each other
>>108235305>seething so badly your brown mind filters parts of the post you don't want to seei accept your concession
>>108237005>am I using OOP if I use classes? because they're fundamentally the same thing as using functions to manipulate structs in C.by the "everything is OOP" cult logic, yes>>108237893>heckin' syntax sugar makes it OOP if they keyword uses the right combination of ASCII charactersi see that you conceded to another poster as well. i will continue to use """classes""" in languages that want me to use them but i will never write a single line of OOP no matter how much your cult wants to call my code "OOP"
>ad hominem
>>108243193please provide an example of oop and non oop using classes which includes fields and functions manipulating those fields.
>>108234507the ECS example sounds a lot better though.
>>108234457Anything good in python was written in C, C++ or Fortran. If anything would be written fully in python it would be garbage. It's the only reason Python is what it is. Without that Ruby would win for non-performance stuff, because it is actually a good language. Python is poo.
>>108234553>need constructors and destructorsHas to be ragebait. You want to tell me youre writing serious, versatile software with abstractions that dont need automatic lifetime management? Constructors and destructors are a natural abstraction you arrive at after trying to do something complicated in C.>>108234485Ironic since after speaking to actual employed game engine devs all of them say ECS is dogshit and nobody in industry implements them for a reason.>>108234799BasedI feel like almost everyone in this thread has never actually worked on a runtime and are just regurgitating memes to support some creator they like.
>>108244771>Anything good in python was written in C, C++ or Fortran. Uhh sure, but we're not dick-measuring for whose daddy is whose, this is about using paradigms and languages to ship products.
>>108244819>Has to be ragebait.You're still at stage n.https://www.youtube.com/watch?v=xt1KNDmOYqA
>>108244858>Posts link to meme youtuberLike clockwork.
>>108244819>durrrr my uncle works at nintendo and he said ECS is shit and no one uses it!Meanwhile, >Overwatch>Minecraft >Dead Rising>System Shock>Thief
>>108244885>doesn't have a counterargumentI accept your surrender, autist. In a proper society you'd already be in a cage.
>>108244885>Industry veteran talking = meme youtuberOOPs...
>>108244889Thief = not technically impressiveMinecraft = infamously shit and tanhled codebase both in Java and especially in the C++ rewriteConsidering ECS is meant to be performant none of the titles you've listed are particularly technically impressive.>>108244898Neither do you, in fact you never had a point.
>>108244936>implying the opinion of an autist mattersFascinating. Now enter the cage.
>>108244936>technically impressiveGoalpost status: MOVEDAlso, you still have no argument.
>>108234442Terrible example. Should have used PHP
Because it isn't bad.
>>108244904what software did he complete in the last 15 years?
>>108245184>Pretty>Huge>PenisYeah I love PHP
>>108245218das gay
It's not that it's bad, OP, it's the misuse of it that makes people advise against it. Creating a banana shouldn't spawn a whole jungle and the monkey holding itObjective C and the Foundation libraries are a great example of good OOP
>>108244008A good Non-OOP example is Haskell and their type classeshttps://www.haskell.org/tutorial/moretypes.html