[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

[Advertise on 4chan]


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1648726278239.jpg (13 KB, 399x400)
13 KB
13 KB JPG
>coworker starts ranting about how useless OOP is
>>
>>86927800
How you doing, Jeff?
I didn't think you browsed 4chan, too.
>>
>>86927800
What are the arguments against OOP other than inefficiency, which is an outdated metric because the biggest performance bottleneck in most modern systems is, by far, distributed computing.
>>
Based. Be grateful that you do not work with an idiot.
>>
OOP is pretty much useless and its concepts are bretty much bad design.
>>
>>86927800
>coworkers start ranting/talking about <non-work-activity>
>ignore conversation and do something else until they get back on topic
I am not paid to be their friend.
>>
>>86927926
nice larp
>>
>>86927800
he is right, what's the issue?
>>
>>86927947
>larp
excuse me? if it's not a 1 on 1 call or meeting there is no reason to give a shit about small talk. It's a waste of time. Why would you sit there like some monkey and turn your brain off to hear about how some guys weekend went ?
>>
>>86927956
That he is wrong.
>>
>>86927800
Junior here.

To the people saying it actually is useless. I'm genuinely curious, what do they mean?

Without it we wouldn't have all the libraries accessible with ease, and most likely have to write everything ourselves?

I checked out C libraries etc, couldnt find shit. Compared to C++ where there is too much shit
>>
>>86927908
how else would you implement operations on data structures? just passing "*this" manually to a func?
>>
>>86927800
He's right.
>nooo, not the hecking objecterinos
>>
>>86927867
wholesome
>>
>>86927800
This is why I hate software engineering. Just become an architect then if it bothers you.
Just go to work do your thing and go home. All this endless gatekeeping and nonsense discussions jfc
>>
>>86928024
then you should go back to school if you still believe in fairy tales.
we're still waiting on a single case where oop improved the situation, there is a reason why modern languages stay the fuck away from it
>>
>>86928049
dont bother
hell tell you to recreate the entire object and pass it to helper functions that also recreate the entire object
>>
>>86927800
OOP is useless, though
objects are only useful in limited cases in the first place, not sure why you'd ever want everything to be objects
>>
>coworker starts to talk about relationship problems as if I have any experience with that
>>
>>86928190
Go, Rust, and every other modern language I can think of has structs with associated methods, and interfaces
OOP won
>>
>>86928048
>Without it we wouldn't have all the libraries accessible with ease, and most likely have to write everything ourselves?
The absolute state of newfags.
>>
>>86927800
>>coworker starts ranting about how useless OOP is
data
logic
I know its hard for a retard like yourself to understand this, but nevermind.
>>
>>86927869
That code should read top to bottom and left to right. Not passing around generic abstractions all over the place so you could satisfy a million "design patterns" and "OOP principles" to make your code work, which btw the next person maintaining your code also needs to know to make sense of your spaghetti mess.
>>
>>86927800
fan fact: OOP in Spanish is POO
>>
>>86927800
Projects like GNOME and systemd spawn from this type of thought.
>>
>>86928472
If you struggle to understand an abstraction, you're either a newfag or working at a company where they're misused, which OOP didn't cause. Poor team standards do, and they'll still exist long after OOP is dead.
>>
Take the ECS pill
>>
>>86928292
Rust is not an OOP language by most definitions. Its trait system was inspired by Haskell, which is pretty much the opposite of OO.
>>
>>86927800
IMO functions + structs are way better and way readable, then eventually define interfaces if you need to plan extendability. Can't stand OOP bullshit too.
>>
>>86928985
aren't structs and classes literally the same
>>
>>86929000
I mean C structs not C++ structs, as in simple data without strings attached
>>
https://youtu.be/QM1iUe6IofM
>>
>>86929041
Yup pretty much, totally agree.
>>
>>86927800
He's not wrong
>>
File: 1647703427293.jpg (9 KB, 250x243)
9 KB
9 KB JPG
>>86928472
>That code should read top to bottom and left to right.
>>
>>86929000
In C++, yes, the only difference is structs are public by default & classes are private by default
>>
>>86928292
OOP has long past moved from the simple idea of "data associated with behaviour" and to a more complex definitionl
>>
>>86928472
>code should read top to bottom and left to right. Not passing around generic abstractions all over the place
do you also hate function calls?
>>
>>86928472
based
>>
>>86927975
for most normies, offices are 100% a captive audience for them to talk about their social life
it's the only outlet they have for it after leaving high school because they're actually boring and obnoxious people and after all their friends left them, the only social interaction they can get is with the other wagies they're stuck with. that's you. if you don't play along you're "not a team player"
>>
>>86930718
thank you for describing my office environment.
however your line of text is too long without mandatory breaks.
>>
>>86928472
Anon let me introduce you to friend
>>
>>86930758
>too long text too much text
make your browser window smaller
or write a css rule to limit the width of post containers like
.postContainer{ max-width: 50vw; }

or just cope and get better at reading
>>
>>86930778
>or write a css rule to limit the width of post containers
but i'm lazy, someone could do it for me and i'd still be upset
>>
>>86927800
based coworker
>>
>>86930808
sounds like a whole lot of problems that are all yours
>>
*YOU* are full of bullshit.
C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it…

So I’m sorry, but for something like git, where efficiency was a primary objective, the “advantages” of C++ are just a huge mistake. The fact that we also piss off people who cannot see that is just a big additional advantage.
>>
>>86927800
structs arrays and funtions are all you need
>>
>>86928500
The coworker or OP?
>>
>>86927800
OOP has it's uses and if you don't know what they are you are a retard
>>
>>86927800
He right tho
>>
>>86927869
OOP is dumb for distributed systems, the most common systems used. If you're handling network messages, you might as well use immutable records (It's not like you can update data that will outlive your handler without sending a message to another server.) and a thin SQL wrapper (Fuck ORMs. You're not giving any fancy methods or state to a user account or field.)
>>
>>86931829
>the “advantages” of C++ are just a huge mistake. The fact that we also piss off people who cannot see that is just a big additional advantage.
>refuses to take 5min to elaborate or give literally just one example of how an advantage is actually a disadvantage.
What a faggot.
>>
>>86932440
>OOP is dumb for my field, which is the only field that matters
>>
>>86933558
I mean, its dumb for every field. OOP has no unique advantages, but a lot of mental overhead. After a while, it doesn't even get to keeps its "intuitive" advantage.
>>
>>86933616
>OOP is intuitive because we naturally think in terms of le objects!
>btw here's 40 design patterns you need to know to do OOP that require countless books and tutorials explaining them because they're non-intuitive
>>
>>86933652
>40 design patterns you need to know to do OOP
strawman
you can do OOP without design patterns
design patterns are not as much "non-intuitive" as they come from experience rather than intuition. them being described in books allows you to recognize the issues they target without having to do multiple years of programming yourself to eventually arrive to the same conclusions
and even then, design patterns are neither absolute gospel nor silver bullets that apply to any problem. using them correctly is a separate skill
>>
>>86933616
>OOP has no unique advantages, but a lot of mental overhead
no paradigm has "unique" advantages, there are only trade-offs
OOP makes understanding complex codebases easier, reducing mental overhead is literally why you implement abstractions in the first place
but if you write only tiny linear toy-programs, of course OOP will seem less advantageous than procedural
>>
>>86933897
>the retarded n00b thinks procedural languages don't have abstraction
sit down and shut up before you hurt yourself
>>
>>86933616
>a lot of mental overhead
I think you're dumb, not the paradigm
>>
>>86933897
If only other paradigms could write abstractions, like functional, or declarative, or... procedural. And honestly, OOP isn't even very good at it.
>>
>>86934096
hi midwit
>>
>>86927800
Methods are nice, but not every data type should have methods.
Interfaces are nice.
Fuck inheritance from non-interface classes.
Fuck "design patterns".
>>
>>86927800
Well, they're not wrong.
>>
>>86927926
Indeed, you are paid to make mr. Goldberg shekels.
Now get back to work, wagie.
>>
>>86934124
You said OOP had "a lot of mental overhead". You struggle to deal with it. That means your faculties are lacking, not mine, I've never had any trouble dealing with OOP, its a simple paradigm
>>
>>86928472
>That code should read top to bottom and left to right.
YOOOOO this nigga don't call functions bruh
>>
>>86934145
Maybe he doesn't mean OOP in theory which is just interfaces and classes with fields and methods but OOP in practice which is often AbstractFactoryBeans and other garbage.
>>
>>86934158
AbstractFactoryBeans don't have a lot of overhead either, they're just using a lot to say a little
It's a simple paradigm, that's why they force low-tier programmers to use it
>>
>>86934145
>t. never worked on any remotely complex or big projects
>>
>>86934173
I work on them all the time, with and without OOP, OOP doesn't add mental overhead
>>
>>86934009
>strawman with no counter-argument
typical cnile getting triggered by the truth
>>
>>86934145
That wasn't me, though I never said I struggle to deal with it, just that its unnecessary overhead. But I forgot that this is /g/, and making life harder for yourself is a virtue.
>>
>>86928292
Go explicitly shits on OOP
>>
>>86934158
>OOP in practice which is often AbstractFactoryBeans and other garbage.
What?
>>
>>86934190
It only adds overhead when you're forced to use it in places it doesn't belong, just like any other programming style
>>
>>86934203
Which is everywhere, because it belongs nowhere.
>>
>>86934211
Please tell me about how you've never made functions that operate on a primary datatype
Or you've never used any form of polymorphism
>>
>>86927867
>Jeff
I think you meant Jiff, or as others call it, Gif
>>
>>86934179
>OOP doesn't add mental overhead
How is even just three levels of inheritance of classes with generic parameters not mental overhead? And in general deciphering what concrete implementation of an interface will actually be used at runtime? I'm sure you are a legit 99.9999th percentile genius and stuff like that takes very little extra processing power, but you can't say that it doesn't take any at all
>>
>>86927800
oop my balls
>>
>>86934237
>How is even just three levels of inheritance of classes with generic parameters not mental overhead?
It's just as much overhead as three nested function calls. You can understand that, can't you?
>>
>>86934219
Yikes. A "this" parameter isn't OOP, and polymorphism isn't inherently OOP either.
>>
>>86934101
>And honestly, OOP isn't even very good at it.
don't project your own inefficiencies on the whole paradigm
>>
>>86934249
I can't because it's blatantly false
>>
>>86934257
If you bundle a data structure with some functionality, you've created an "object"
If you program in a way that uses these objects to pass messages to each other, you're doing OOP
>>
>>86934260
Explain to me how three levels of inheritance is different to three nested function calls? Or are you complaining that dynamic polymorphism makes things hard to follow? Because that's true, but I've got news for you, OOP didn't invent dynamic polymorphism, and there's a lot more of that if you're doing functional programming than OOP
My suggestion would be to use a proper debugger
>>
File: 6e4.png (14 KB, 644x800)
14 KB
14 KB PNG
>>86927926
>>86927975
>ranting activity detected
>initiate <ignoring external signals> program
>while $1; do ./check-signal-strength; done
>if askedForReasoning { return "waste of time" }
>code analysis: "distraction" variable brings company losses
>code report: must squeeze last bits of efficiency to bring mr. Shekelberg his every single cent
>report conclusion: wagie is here to work, not talk
>>
>>86934237
>How is even just three levels of inheritance of classes with generic parameters not mental overhead?
why are there three levels of inheritance? if each level is a clean abstraction and not you writing convoluted code on purpose as a shitpost, you don't even need to look further than just one layer at a time

>And in general deciphering what concrete implementation of an interface will actually be used at runtime?
why would you need to "decipher" this?
if your layer of abstraction is using the interface, why would you even care which implementation it is?
if you need to investigate a specific implementation, why can't you just debug that specific implementation?

sounds like you're really shit at writing any code more complex than a fizzbuzz
>>
>>86934276
>Or are you complaining that dynamic polymorphism makes things hard to follow
certainly harder than three nested function with no polymorphism yes
>>
>>86934291
because you might want to get a complete understanding of the system, rather than do short term bug fix consulting work.
>>
>>86934317
OOP doesn't force you to use polymorphism. Genericism and dynamic dispatch is in no way unique to OOP. If you're just doing plain procedural you have function pointers.
>>
>>86928943
It doesn't have inheritance, and its encapsulation happens on a module level. Those are not OOP.
I see no conflict between traits and OOP. It's unorthodox but doesn't violate it.
>>
>>86934362
This tbqh. I do object-oriented programming and I don't touch polymorphism at all. I just find objects a nice and more intuitive way to think about data and operations done with it, and user-defined types a useful way to organize the components of a program.
>>
>>86929340
>>86930688
>>86930764
>>86934155

All of you are outing yourselves as complete morons. Compare this:

Foo() {
Bar1()
Bar2()
Bar3()
}

Bar1()...
Bar2()...
Bar3()...

To this:

Bar1...
//...
Bar3...
Foo() {
Bar1()
Bar2()
Bar3()
}
//...
Bar2()...
>>
>>86934622
Do you understand that functions are written so you can call them multiple times, from different places?
>>
>>86934653
That's only one use for them. You can also make your code much more readable using functions with descriptive names.
>>
>>86934663
That's the primary use for them
>>
>>86934688
>>86934663
>>86934653

you are both wrong. You can use functions for performance reasons. I’m not going to tell you why.
>>
>>86934688
What's your point? That functions should only be used for functionality that is used from multiple places?
>>
>>86934734
baffling post
>>
>>86928472
what kind of kindergarten software are you writing?
>>
>>86927800
It is bloated and useless though
>>
>>86928500
gnome literally developed GObject, oop for C
it was pretty comfy but deriving was pain
>>
>>86927800
Based coworker, learn from him
>>
>>86934337
you will not understand anything complex if you just go "top to bottom" over the whole codebase, doesn't matter if it's OOP or procedural
if your codebase has proper abstractions you won't even need to go over the whole codebase to understand the system completely, but again it's irrelevant if the code is OOP or procedural
>>
>>86927800
I bet he's asperger and under 20. The more mental stability, sanity, children, boats and houses you have, the more you know JAVA is the best. Alternative being poor, smell bad man.
>>
People never really offer a real alternative to OOP. Haskell is weird, and probably requires a math degree in freaking category theory. If there is an actually good alternative to OOP, the market would have already adopted it, since it's driven by high competition. But since freaking Java still dominates the market, it means that the other new *paradigms* aren't really that useful that corps didn't want to use it.
>>
>>86927926
>gets fired for being unsocial
Wagie, your coworkers are supposed to be your new family.
>>
>>86927800
Sounds smart, you should listen to him.
>>
>>86936493
The problem is that there is a lot of programmers (especially poos) who don't understand how to properly use OOP.
I takes time to master polymorphism and use it at its full potential.
>>
>>86936498
>Haskell is weird, and probably requires a math degree in freaking category theory.
filtered
>If there is an actually good alternative to OOP, the market would have already adopted it
the market doesn't care about quality
see: webshit
>>
>>86937403
Programming is more similar to architecture than to math. FP is just a weird cope that math nerds love.
And the market cares about quality. If you think maintaining a website like Amazon for all these different people all over the world, at this speed, with their huge db, and at this level consistency and availability is just easy and has nothing to do with quality, then you're a dumb NEET who never managed any serious level of complexity which is like the case for 90% of Haskell fags lol
>>
>>86934173
I've worked at Google, Microsoft, and several startups. OOP is fine. You're a retard if you struggle to understand it in a well-implemented system.
>>
>>86937702
And if you're working with a poorly-implemented system, OOP's misuse isn't unique. Your coworkers would gladly fuck up any other paradigm you give them. Just grind your way into a better job with coworkers who give a shit and thank me later.
>>
>>86927800
>>coworker starts ranting about how useless OP is
>>
>>86927869
OOP makes zero sense in a world where we are sending so much shit over the wire. Constantly mapping to objects between calls, when in reality data should be interpreted as a string of bytes, or maps. Clojure is the only language I know of that does it right, data is just a map.

You can become enlightened by this video:
https://www.youtube.com/watch?v=aSEQfqNYNAc
>>
>>86928472
>IN A SINGLE FILE
LEL
>>
>>86927800
he's right and you are a nigger
>>
>>86937797
Cool video, however, when you work on a large project, freaking maps everywhere become a nightmare. You don't know what keys each map has. Even Elixir, which is used a lot in webdev, is dynamically typed. Why FP is scared of static typing?
>>
>>86934158
That's just java not OOP in general
>>
>>86934653
>Do you understand that functions are written so you can call them multiple times, from different places?
You are not writing a library, which is the only place abstraction makes sense.
You and your place of work would be much better served by using an existing library with its own maintainers.
>>
>>86927800
report him to HR
>>
>>86936498
>the market would have already adopted it, since it's driven by high competition.
Okay, that gave me a good laugh. Does anybody else remember when Apple made a trillion dollar empire off of making an already existing product run at 24 fps instead of 6?
>>
i.shart.and.it.stinks.and.i.will.do.it.again()
>>
>>86939625
The market cares about quality, it has no other choice. It is just a cope made by NEETs to justify themselves being unemployed by prestigious tech companies
>>
>>86927800
This is just so stupid.
>Everything should be an object!
No
>Nothing should be an object!
No

OOP is a tool for describing some types of problem, making them more comprehensible. Doing a GUI without objects is really unpleasant (I've tried and I'm not gonna do that again). Doesn't mean that it solves everything, and only idiots ever argued that it did, just as only idiots are arguing that it solves nothing. What's wrong with using the right tool for the job? If you can't cope with using a mix of tools, picking the right one for the situation, you're an idiot and a sperg who needs to kill yourself. For the good of the gene pool.
>>
>>86937680
>FP is just a weird cope that math nerds love.
filtered. lambda calculus is turing complete.
if you want to
>If you think maintaining a website like Amazon for all these different people all over the world, at this speed, with their huge db, and at this level consistency and availability is just easy and has nothing to do with quality, then you're a dumb NEET
FAGMAN uses advanced languages in both research and production, because it can afford to hire people who have functioning brains
>>
>>86940410
>if you want to
if you want to avoid math in programming i suggest sticking to webshit*
>>
>>86940410
Advanced languages like Java, yeah

>FAGMAN can afford hiring smart people
>FAGMAN still uses Java and OOP because, because, because... FAGMAN just doesn't care about quality :'(

Cope harder
>>
>>86940439
>>FAGMAN still uses Java and OOP
and? your argument was that FP is NOT used, which is patently false, and pure brainlet cope.
if a company wants something to run on the JVM but not made by an 80 IQ driveway defecator, they use scala or clojure.
>>
>>86940476
No, my argument was if OOP is that bad, and FP is way better, then FAGMAN would have already switched to use FP over OOP to gain all the benefits. But they didn't.
>>
>>86940500
Facebook uses Hack which is PHP++.
>>86940410 is wrong, most code from FAGMAN is probably shit. It's hard to keep quality high when you have millions of lines of code.
>>
>>86940500
your argument is fundamentally stupid since it's a giant bandwagon fallacy
>>86940829
>most code from FAGMAN is probably shit.
i never said otherwise, haxl for example is fucking hideous
>>
>>86940829
>Corps that manage huge amounts of complexity, huge amounts of data and traffic don't have high quality
Sorry you got filtered by LeetCode
>>
>>86940859
Sorry you got filtered by LeetCode
>>
>>86941055
>>86941072
>Smooth brain poster double posting
>Leetcode shill
Yeah, it fits. You are unable to solve real problems without "grinding leetcode" for days before an interview.
>>
>>86942450
>pretending you can solve DP hards without practice
How's your project going, intern?
>>
>>86942450
If retards here ever touched LeetCode, they'd have known that algos and data structures matter more than their autistic programming paradigm lol
>>
>>86930718
> if you don't play along you're "not a team player"
this is what shits me
coworkers don't give a shit about you actually doing what you're hired to do (in fact, if you do it too well, you'll make them look bad)
instead its all about prosocial garbage, and if you tick off the wrong person, it'll cost you your job
>inb4 shekelberg meme
i don't particularly care about working, i just wish "socializing" wasn't a part of my job. i hate talking to normies a lot more than i hate working
>>
>>86927869
imo the main selling points of OOP are inheritance and abstraction.

inheritance is really only useful in certain situations where you have multiple things that build on the same thing.

OOP where useful can lead to cleaner and more robust code, but OOP as a religion leads to sprawling over-engineered solutions when all you needed was a structure and a couple functions.
>>
File: 1648104159139.jpg (33 KB, 657x527)
33 KB
33 KB JPG
>>86928472
Based retard
>>
>>86927869
80% of the time you want composition, not inheritance. when inheritance makes sense, oop should be used. but it shouldn't be the primary paradigm you design around
>>
>>86934237
Bad craftsman blames tools.
>>
>>86927800
Dumb frogposter.
>>
>>86944915
Nice number did you pull it out of your ass
>>
>>86944967
studies show 80% of statistics are anecdotal generalizations and are not intended to be hard facts + dismisinformation
>>
>>86940327
/thread
>>
>>86940327
OOP is a paradigm, so it's not as much a tool as it is a way of thinking/approaching a problem. don't think hammer vs screwdriver, think "break it apart" vs "take it apart"

with programming there rarely is a "right tool for the job" as there rarely is "right vs wrong" anything - it's all tradeoffs
>>
>>86944816
>when all you needed was a structure and a couple functions
and, in terms of complexity, what's the difference between that and a class and a couple methods?
apart from a class being more cohesive

>but OOP as a religion leads to sprawling over-engineered solutions
that's projecting
you can be "religious" about OOP and still aim for simple solutions
you can be a zealous "aOOPtheist" and still over-engineer or over-complicate solutions
>>
>>86930718
t. projection
>>
>>86931829
You can write tons of bullshit in C. Your point being?
>>
>>86946447
not sure you know what projection is, especially given >>86946066
i have friends outside of work, where i do my socializing, which is why i find the repulsive friendless office-based captive-audience socializers so obnoxious.
>>
>>86946491
If I talk to you at work, I'm not doing it for a friendly chat. I'm doing it to let my mind go blank and rest. And because two people sitting quietly next to each other is quiet and autistic.
That's okay because you can give me monologues anytime in return.
>>
>>86944816
IMO the main selling point of OOP is organization.
>>
OOP is shit by garbage eating pajeeva shitters for garbage eating pajeeva shitters
>>
>>86946926
filtered
>>
>>86947290
mv poo loo



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.