correctly
oo and the ability to understand it (or not) = the intelligence filter
gates should never have been let near a computer.
procedural is for illiterate barbarians
thugs, like the british government
2 years ago
Anonymous
people who wreck systems
people who destroy decent people, work
frick their 'jubilee'
they are failed animals
worthless cowards
soldiers suicidign over afghanistan?
they should t he worthless shit.
try doing a reaal job
try doing it for those animals
waste your fricking time
british are vermin
2 years ago
Anonymous
ill fking get tht bastard
'progressive' 'roman
ill get him
i watched enough of it. it is the same old story
they don't know how to implement the framework
he is not intelliigent enough to map out oo in his tiny brain. thats the thing about functional/procedual .. you don't have to remember much. he wants it all in one fking function cos he can't remember. is an idiot. probably british
2 years ago
Anonymous
some IDIOT way back. is on youtube was selling 'programming in python without objects'
This video revealed to me that most oop haters simply do not use IDEs. They use notepad, or even worse, VIM, and it pisses them off that they have to “jump around” in the code, when normal people with IDEs just press F12. Thats it
I bet if it was a 15000 line long file he would be overjoyed
IDE's are a waste of CPU cycles.
Imagine if in order to read a book you needed a massive, slow, constantly breaking down machine to help you find the right pages for you.
>Object Oriented Programming is bad. I'm one of the 5% of people who think it's completely bad, never good, not useful anywhere >6 minutes later >Yeah so the ideal way to program is Objected-Oriented + Functional
???
?!?!
#@&!%*?!
I'm not even hating on the guy, I'm an amateur and I wanna get knowledgeable, but this just confuses me.
>Object Oriented Programming is bad. I'm one of the 5% of people who think it's completely bad, never good, not useful anywhere >6 minutes later >Yeah so the ideal way to program is Objected-Oriented + Functional
???
?!?!
#@&!%*?!
I'm not even hating on the guy, I'm an amateur and I wanna get knowledgeable, but this just confuses me.
I watched the whole video now and it makes sense. I believe him now. I understood his points and they swayed me. They made a lot of sense compared to (mentioned) Fireship-tier little trivial examples of "cat class that extends Animal class". It would indeed be nightmarish and useless to make a whole big program like this. Thank you for posting this.
2 years ago
Anonymous
can only say that you've got tricked
he presents everything in a well presented manner, but basically the whole video is based on strawman arguments
he builds overly abstract and convoluted examples that would make no sense as soon as you tried to write a real example of such a program structure, at the same time not even giving a good definition what "abstraction" is
he presents everything in a well presented manner, but basically the whole video is based on strawman arguments
he builds overly abstract and convoluted examples that would make no sense as soon as you tried to write a real example of such a program structure, at the same time not even giving a good definition what "abstraction" is
I've always considered this the best anti-OOP lecture, because it is explicitly anti-OOP just anti-bad design.
this basically. what most tards on this board don't understand is that there is no single universal solution to all programming problems. use the right tools for the job and stop sperging out "this bad, that good" like a bunch of inbred mongoloids.
Way too often the people propagating it are idiots. Like you know when someone mentions "object oriented" whatever the thing that follows is going to be total bullshit.
Exceptions. I hate them with a passion. Anything with exceptions built into it, is just bad by design.
Especially since exceptions that catch spare data are forcefully created and significantly slow down program speed.
because most OOP out there is the corpo babble flavour that has very little to do with OOP (as implemented in smalltalk)
good OOP is good, bad OOP is bad, just like with everything else
it just so happened that OOP became a perversion of its original form
In response to the deleted comment.
I had a gif/webm of a black goddess in her absolute prime that I'd seen on IQfy or /vg/ I think, but I can't fricking find it.
I've looked at my history and it maybe a thread whose webpage title was "IQfy - "Why are women so ugly in Western games? And don't - Video Games - IQfy", around May 17 2022, but I'm too moronic to find it on tbharchive.
If you write good OOP you feel like a fricking god. Realizing a gigantic complex behavior set can be reduced to a small set of classes with inheritance, interfaces and dependency injections is one of the most kino feelings ever
You can do this with literally any paradigm. Functional programming will have you breaking problems down into smaller and smaller functions. Even concatenative programming will have you breaking problems down into smaller and smaller routines. Breaking problems down into smaller problems is a fundamental component of programming, and the different paradigms are just different ways to do it. There's nothing special about using objects to do it.
It's like saying God isn't real. Nobody can agree on what "God" means in the first place. But the popular version (what you see in Java) is clearly bullshit.
It's not just don't treat it like a religion and you'll be fine. People treat object oriented programming like its a hammer and every problem is a nail and you get shit people make fun of. State isn't terrible and is usually needed for most applications you are going to make. Don't force inheritance unless you are using interfaces as they actually function like promises. Use composition over inheritance.
I think the train of thought was that properties are like physical belongings, the has-relationship. The name doesn't belong to you, it describes you. So how does one call such a relationship? I know! In OOP everything is an object, so it has to be an object
you certainly wouldn't go around adding a dog.bark() method or whatever nonsense they show in OO tutorials
? Or are you talking about something else?
2 years ago
Anonymous
a dog is an animal, ok. But at the same time a dog can also be a family member, which isn't an animal. Or a dog could be an asset. Inheritance is just terrible at modeling the world, the world isn't hierarchical
2 years ago
Anonymous
abstractConcreteFactoryFactory
>his language doesn't support multiple inheritance
2 years ago
Anonymous
Multiple inheritance is not a good thing. It makes it just worse.
Use composition instead
2 years ago
Anonymous
So the dog contains an animal, a family member and an asset?
2 years ago
Anonymous
Yes. This design is way more flexible than any inheritance based approach.
2 years ago
Anonymous
>a dog can also be a family member, which isn't an animal.
Yeah, not with Christian imperialist patriarchy in charge. Agree with the rest for the most part. You can model it. It's just very complex. Think of things like a big relational database.
Man: ID, Name, age, hair color, eye color, height, statusID, etc..
Status-Man: StatusID, statustypeid, startdate, enddate
Man-Business: ManID, business id, begin, enddate
Employer: ID, employeeid = ManID, etc...
If I can put it in to a database, I can program for it as well. It just gets, again, really complex.
2 years ago
Anonymous
>[Dog] is a family member
Are you moronic? You don't implement it that way. You literally solved your problem in your sentence. "Dog is a family member" means "Dog is a member of family" which is the same as "Family has a dog" so an object of type Family should contain Dogs and Humans.
>dog can also be a family member, which isn't an animal
No shit. That's why you create a FamilyMember interface so that you can choose which Animals are capable of being family members and doing actions like love(), hug(), molest(), or whatever the frick. An abstract Animal or a subclass Mammal won't necessarily be family members so they won't implement the FamilyMember interface, but Dog and Human can be family members so those classes will implement the interface. The Family class should be made so that it can only contain objects that implement the FamilyMember interface.
This is pretty fricking simple and super easy to scale as you add more animals, and not just animals. Say you're one of those families that consider their Roomba to be a family member. All Roombas are robots, so Roomba will extend abstract Robot and get robot's methods. But, Roomba will implement FamilyMember so Family thehomosexuals will be perfectly satisfied having a Roomba among its ranks.
2 years ago
Anonymous
When I don't wanna retype the same method for a bunch of different classes
OOP itself isn't bad and, like other styles, has its place. The way people use it can be bad and it often leads people down the wrong path. Often because they don't strictly enforce single responsibility. Many languages also have a lot of overhead defining classes (e.g C++) making it less appealing to create lots of classes to maintain that single responsibility. It's useful/interesting to fire up one the Smalltalks (Pharo, Squeak) and browse around their class hierarchies. Those frickers like it wide and deep.
I agree. The problem is not OOP as a concept itself, but how it's implemented. It can be a pain in the ass depending on the tool.
I swear that most people that hate OOP are failed C++ devs, although C++ is also part of the problem with it's "jack of all trades, master at none" mentality that misleads a lot of people.
I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters.
Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.
Coupling them to objects is good when it makes sense semantically, which is often.
2 years ago
Anonymous
Nope. Still better to separate functions from structs.
you can put them in the same namespace if you think they are related. But functions are related to structs by their argument types.
As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects. Because you have to make an arbitrary decision in which object to put them.
2 years ago
Anonymous
>As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects
I take it you have problems with human language grammar too?
>Why is putting functions into global namespace a good thing?
I never said that? Just because you aren't using object doesn't mean you have to regress back to a style without modules/namespaces. Put your functions into logical classes/namespaces/modules/whatever.
>Put your functions into logical classes/namespaces/modules/whatever.
Yeah, like attaching functions related to Thing into a namespace named Thing. Then you call Thing.action(thing). And then you realize you can avoid repetition with some sugar.
2 years ago
Anonymous
Surprise, OOP style languages have trouble writing and a non-OOP style. Scala fixes this by allowing you to create two different closures, one for the data (case class), and one for the functions (object). In this way you are assured that the things.action is as complete as action(thing) would be.
2 years ago
Anonymous
You can literally do it in most oop languages it is just pointless
>internal fields are phantom parameters
If you have direct access to them, then it is much easier to frick things up
For instance if a field is a pointer and whenever you set it to something else you want it to be deleted. You add some setter method that releases the resources first. This is bad because it hides the invincible parameter, apparently. However if you manually have to release it, and the field is referenced 99 times in the code, good luck finding the memory leak
Not having access to fields make correctness easier to achieve, not harder
Also, classes are rarely data. Sometimes they are, when you are representing sql for instance, but usually they are separated concerns and their state exists so they can do their job. This is why I hate the college example of classes because 99% percent of the time your class is some sort of manager or helper, that imports files or generates output, not data. It is much simpler to manage your program as if it were boxes of lego separated by color and function, meanwhile some people just want one big box of lego tht has everything dumped together since “looking into boxes is annoying”
>I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters. >Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.
git idiots
with their little 200 line attempts
if you program a system
you have a fking map of every single
fricking line of code
every single
fricking line of code
you know what. why where. you know what all the types are
2 years ago
Anonymous
you know what leads into what
you know what becomes what
you know what generates what
if you can't remember to that scale
forget programming
cos you forget
2 years ago
Anonymous
you want to know what 'the land of the forgot'
=
'legacy systems' is a term
of the wastage of the lost info
'windows'
'microsoft'
2 years ago
Anonymous
legacy companies aren't junk stock
shitheaps
microsoft
facebook
twitter
prime stocks
your economy is nothing
why the $ is no longer the reserve currency
you are fricking idiots
now
2 years ago
Anonymous
legacy code companies
microsoft
facebook
twitter
horrible messes
so funny
die america
it's not, but if your language is based entirely on classes, as in no procedural functions unbound to a class, then it's a shit language. ironically, c++ got it right before java did, but nobody cared yet. every moron thought that java shit was the future, but now they are basically reverting back to c++ but better(GC, type safety, whatever)
What is Object Oriented programming?
Genuinely: which of the supposed features of OOP are actually OOP: >encapsulation
Modules provide this in non-OOP languages >polymorphism
OOP only provides an extremely weak type of polymorphism called subtyping-polymorphism. parametric polymorphism is much more powerful. Java and C# have both implemented parametric polymorphism (called generics in Java/C#) and ad-hoc polymorphism (via interfaces), but those features came from the ML world. >data abstraction
As anyone who has ever programmed in a non-OO language knows, this is not limited to OOP. >inheritance
Actively discouraged by OOP-advocates ("composition over inheritance") >dynamic dispatch
This really just amounts to first-class functions, popularized in the 1960s by lisp before simula >message passing
This may characterize smalltalk, but is never used in popular OOP languages today except in the context of implementing parallelism
So the question remains: what properties/features actually define OOP?
how is it defined then?
I could define functional and procedural programming quite easily:
functional: programming using function composition where definitions are referentially transparent and functions are first-class
procedural: programming where series of computational steps are arranged into procedures which may called anywhere in the program, including recursively in the procedure definition
why is object oriented programming so difficult to pin down and give a non-ambiguous definition?
in principal, OOP is a paradigm where you define related state (as fields) and behavior (as methods) into classes, which you then can instantiate (as objects). then one object can interact with another object, e.g. instantiate a new one or call methods of another; and each object/instance, even of the same class, has its own private state
the difficulty to define OOP in a generic, standalone manner probably comes from the fact that it's quite abstract by itself, so you would be heavily leaning to explaining by example or by comparison.
OOP examples are pretty much always garbage, especially the "Dog extends Animal" example as it focuses only on inheritance, and is an example detached from programming (you don't program Dogs).
if you were to compare it to procedural, then both are imperative (i.e. you define "how" to get your result, opposed to declarative where you define "what" you want as your result), but OOP has much tighter scoping of state and behavior, because each method or field belongs to a specific class (opposed to procedural where a function just "is" and you're not constrained in accessing it)
both of your definitions are ambigious and / or wrong (FP doesn't need composition and PP doesn't need recursion)
All these paradigms are ambigious, OOP just more so
2 years ago
Anonymous
show me a non-trivial program written in functional style which is not compositional?
even seemingly imperative let-bindings are disguised function composition.
let x = f p in g x
OOP isn't inherently bad, you can write obtuse code in any language. The problem is that bad programmers who are inevitably introduced to the paradigm will try and use it everywhere whether it's needed or not. You can find hefty tomes about what design patterns OOP enables and it's not always easy to explain that often the best way forward is to ignore them and keep it simple unless you have a real need to do so.
you can write obtuse code if you are post 30 out of your shit sales career. trying to get in. and not having a fking clue what oo is. not having learnt the right way. having learnt the easy way. and you will never learn unless you learn the hard way, unless you go through the fricking mill. = processsing, seeing every line of code execute. doing it manually, in your head. idiots. losers. seeing sales people disintegrate because their fricked organisations implode, is funny.
die.
according to the other thread I was in OOP isn't bad its just that it makes devs break up their code in a million places and spagettfiys it making it shit
as long as you use an IDE (and you should), navigating split code is a cinch, and broken up code is actually much easier to read than 100+ LoC functions, which is the real spaghetti
They were using F# for some things and C# for others. So littered throughout the C# code were these awkward fricking F# objects.
Also most devs were C# devs including myself, we couldn't understand the F# code and didn't see the point in it anyway. It has very little industry adoption and dosent solve any problems C# can't also solve. Basically it's almost as useless to learn as some company specific DSL. That's the real problem with F#. Most people don't want to learn something semi useless.
2 years ago
Anonymous
Ah, so it wasn't fully F#. Why even start with it in the middle of the project? Awkward indeed.
2 years ago
Anonymous
It was 1 guy years ago who wrote all the F# stuff and pushed it heavily. Way before my time. Im guessing nobody else was onboard with F#. He also made the borderline insane Winforms code the company was using.
> Why is OOP bad?
Depends. Most people will argue about inheritance, or dependency hell, or polymorphism, or whatever, but when it comes down to it, OOP's biggest issue is one of definitions. There are 100 mutually exclusive approaches to OOP, all of which competing to be "the real one." Its hard to talk about why "its" bad without defining which version(s) you're referring to.
This is the only article you'll ever need to read to debunk OOP. http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end
Now sit back and watch morons squirm and foam at the mouth trying to badly refute it.
oo is bad because brainlets
people like erm 'bill gates' dont understand it
so they therefore say it aint the true path
if youwant to know what trying to do an OO system without oo looks like, look @ 'windows'
gates aint smart. u dont have to be smart if you are 'privileged' you can be fking anything
programmer. biochemist. pedophile. cuck
oo is nature
see a plant
make tht
make a fking mess in C
gates saw a plant at xerox parc
he tried to recreate it
in C
without oo
'the dark ages of tech'
pcs are the junk
pcs are the same garbage shin barking tin boxes
dirty fking crap. power sucking idiocy
they were in the 80s
that is gates thats what he achieved
apart from fricking a few 12 year olds
The name is a property of a exterior system, who gives that human a name.
You could say that human has a self proclaimed name, then it belongs to him
Humans don't have methods. A human can't send an email, it can interface with a computer to send an email
The problem with OOP is that people think objects can do things (model), which is a lie. Objects do not do things, they do not have models, objects ARE things, and they can interface with other things to create something (which are systems of relationship of objects)
The idea that objects have models is the most stupid decision ever and it ruins everything
>make a UI building block like a textbox >another one which displays pictures >99.99% of the code is the same (50000 lines) >make both inherit from some uiEement whatever base class
Or >have some basic feature like a menu >use it in a different program >now it requires one thing to do something slightly different >make it a virtual function and override the behaviour
This is how inheritance is used in the real world, and it is very handy
The fact that so many people are so obsessed with college grad “class Dog : Animal” tier examples proves none of you have any work experience or do some archaic shit C or Delphi
I like to do external polymorphism. It's non-intrusive as it doesn't force you to inherit from a base class or add member functions. As long as free function exists with the correct signature, you can store it as a polymorphic type (like rust's Box). You can also make your model implement a non owning polymorphic reference or use a small buffer to store the type inline instead of using unique_ptr.
class Flying
class Walking
class Bird inherits from Flying
class Sparrow inherits from Bird
class Ostrich inherits from Bird
But Ostrich doesn't fly, Ostrich should inherit from bird, but not all birds fly. Do we have a class Flying and a class Walking, and have no class for Birds? All birds lay eggs, so how do we reuse egg-laying code for both Ostrich and sparrow, but not for Bats, which inherit from flying but are not birds and do not lay eggs?
interface Flying
interface Walking
class Bird
class Sparrow inherits from Bird, implements Flying and Walking
class Ostrich inherits from Bird, implements Walking
class Bat implements Flying
Interfaces are neat, but they aren't sub typing polymorphism (aka OOP polymorphism), and come from functional programming, not from OOP: ad-hoc polymorphism was introduced by Wadler and Blott to Standard ML in 1989. So it's hard to argue they represent OOP. Sure OOP langaues have them, but Java also has anonymous functions and c# has list comprehensions, but it would be difficult to argue that these weren't functional features embedded in an OOP langauge.
Also, why not make Bird an interface as well?
Why not do away with class inheritance entirely, and have only standalone class definitions and interfaces like Haskell and Rust?
Also, in haskell and Rust it's possible to do something like this
interface EggLaying<T>
interface Bird<T> where T implements EggLaying
Requiring all types that implement Bird to also implement EggLaying. Is that possible with Java interfaces?
interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface
>Also, why not make Bird an interface as well?
given no context what Bird's purpose is, it could be either interface or class
it might, or might not, have fields reused in the classes extending it
>Is that possible with Java interfaces?
if you mean interfaces extending other interfaces, yes that's possible in Java
for example https://docs.oracle.com/javase/8/docs/api/java/util/List.html
2 years ago
Anonymous
>interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface
You just described ad-hoc polymorphism.
2 years ago
Anonymous
quickly reading up the definitions on wikipedia, no, it's not - the interface polymorphism comes from the other direction than what's described as "ad hoc polymorphism" (function/operator overloading)
if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.
>if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.
I'm working on an Elixir project started by two morons and it's just as buggy, slow and nasty as any other codebase. FP doesn't protect you from shit code, no paradigm does.
OOP as a set of features is useful and so are the basic principles of OOD (loose coupling, high cohesion). Some people worry too much about "correct" OO architectures rather than useful ones.
>inheritance is bad >frameworks are good
same thing conceptually, morons. Reminder 90% of "developers" are awful at their jobs and are the equivalent of 1950's typists that just copy/paste code and don't actually design anything
fpbp
yet another dickhead unable to use OO well
Nobody nows how to "use OO well".
correctly
oo and the ability to understand it (or not) = the intelligence filter
gates should never have been let near a computer.
procedural is for illiterate barbarians
thugs, like the british government
people who wreck systems
people who destroy decent people, work
frick their 'jubilee'
they are failed animals
worthless cowards
soldiers suicidign over afghanistan?
they should t he worthless shit.
try doing a reaal job
try doing it for those animals
waste your fricking time
british are vermin
ill fking get tht bastard
'progressive' 'roman
ill get him
"Using OO well" is even worse. You didn't watch 1 second of that video, did you.
i watched enough of it. it is the same old story
they don't know how to implement the framework
he is not intelliigent enough to map out oo in his tiny brain. thats the thing about functional/procedual .. you don't have to remember much. he wants it all in one fking function cos he can't remember. is an idiot. probably british
some IDIOT way back. is on youtube was selling 'programming in python without objects'
This video revealed to me that most oop haters simply do not use IDEs. They use notepad, or even worse, VIM, and it pisses them off that they have to “jump around” in the code, when normal people with IDEs just press F12. Thats it
I bet if it was a 15000 line long file he would be overjoyed
IDE's are a waste of CPU cycles.
Imagine if in order to read a book you needed a massive, slow, constantly breaking down machine to help you find the right pages for you.
Ok
Enjoy seething because you had to open two whole textfiles
>Object Oriented Programming is bad. I'm one of the 5% of people who think it's completely bad, never good, not useful anywhere
>6 minutes later
>Yeah so the ideal way to program is Objected-Oriented + Functional
???
?!?!
#@&!%*?!
I'm not even hating on the guy, I'm an amateur and I wanna get knowledgeable, but this just confuses me.
Welcome to IQfy
I watched the whole video now and it makes sense. I believe him now. I understood his points and they swayed me. They made a lot of sense compared to (mentioned) Fireship-tier little trivial examples of "cat class that extends Animal class". It would indeed be nightmarish and useless to make a whole big program like this. Thank you for posting this.
can only say that you've got tricked
he presents everything in a well presented manner, but basically the whole video is based on strawman arguments
he builds overly abstract and convoluted examples that would make no sense as soon as you tried to write a real example of such a program structure, at the same time not even giving a good definition what "abstraction" is
I've always considered this the best anti-OOP lecture, because it is explicitly anti-OOP just anti-bad design.
This is pretty based. Thank you anon.
It isn’t, but it’s overused for a lot of applications where it shouldn’t be used
this basically. what most tards on this board don't understand is that there is no single universal solution to all programming problems. use the right tools for the job and stop sperging out "this bad, that good" like a bunch of inbred mongoloids.
>on this board
try the entire fricking internet
well... yeah now that you say that.
Way too often the people propagating it are idiots. Like you know when someone mentions "object oriented" whatever the thing that follows is going to be total bullshit.
OOP via composition is useful. Inheritance more than 2 levels deep is stupid and anyone doing that or defending that gets the rope.
I love OOP.
I fricking hate inheritance with a passion.
Every time I see it used it typically stops making sense after the first level.
Exceptions. I hate them with a passion. Anything with exceptions built into it, is just bad by design.
Especially since exceptions that catch spare data are forcefully created and significantly slow down program speed.
>Muh speed
Ask me how I know you're a filthy undergrad.
Dangerously based
>OOP via composition is useful. Inheritance more than 2 levels deep is stupid and anyone doing that or defending that gets the rope.
The truth.
because most OOP out there is the corpo babble flavour that has very little to do with OOP (as implemented in smalltalk)
good OOP is good, bad OOP is bad, just like with everything else
it just so happened that OOP became a perversion of its original form
Only people browsing this board and saying stuff like that can be ruled out as humans.
this
In response to the deleted comment.
I had a gif/webm of a black goddess in her absolute prime that I'd seen on IQfy or /vg/ I think, but I can't fricking find it.
I've looked at my history and it maybe a thread whose webpage title was "IQfy - "Why are women so ugly in Western games? And don't - Video Games - IQfy", around May 17 2022, but I'm too moronic to find it on tbharchive.
It's worth it bros.
alright IQfy, rate IQfy's taste in women
for all intents and purposes, that's just a white woman with a tan
Decent, but with makeup anyone can look acceptable
If you write good OOP you feel like a fricking god. Realizing a gigantic complex behavior set can be reduced to a small set of classes with inheritance, interfaces and dependency injections is one of the most kino feelings ever
this.
And if you notice something is slowing everything down its way easier to catch and fix.
code gets tinier and tinier
infinitely tiny
You can do this with literally any paradigm. Functional programming will have you breaking problems down into smaller and smaller functions. Even concatenative programming will have you breaking problems down into smaller and smaller routines. Breaking problems down into smaller problems is a fundamental component of programming, and the different paradigms are just different ways to do it. There's nothing special about using objects to do it.
>object woman
classic
Came here to post this.
It's not. Bad is the analyst/user not knowing how to write storys.
It's like saying God isn't real. Nobody can agree on what "God" means in the first place. But the popular version (what you see in Java) is clearly bullshit.
>Nobody can agree on what "God" means in the first place
Purely Actual
fun fact: POO is OOP in Spanish.
Someone wanna replace human with the proper term ?
secondary?
Only actual OOP stuff like Smalltalk and Ruby are good
Java, C++ and clones are crap
It's not just don't treat it like a religion and you'll be fine. People treat object oriented programming like its a hammer and every problem is a nail and you get shit people make fun of. State isn't terrible and is usually needed for most applications you are going to make. Don't force inheritance unless you are using interfaces as they actually function like promises. Use composition over inheritance.
>name is an object, not a string
Yep, sounds like OOP.
I think the train of thought was that properties are like physical belongings, the has-relationship. The name doesn't belong to you, it describes you. So how does one call such a relationship? I know! In OOP everything is an object, so it has to be an object
I need a method for giv coon gf
in real lisp (scheme) this is just
(giv-coon-gf)
that function has a lot of side effects tho
i dont even know what inheritance is, i just like having contained variables
good, inheritance leads to bad code, composition and message passing should be the main goal of OOP
inheritance only leads to bad code if you misuse it
it's always misused and when it isn't misused it's useless.
>when it isn't misused it's useless.
wrong
Why?
I find inheritance pretty handy sometimes.
show me one example where inheritance isn't equivalent to message passing
>backpedalling
public class Animal
{
public string Name {get; set; }
public int Age {get; set; }
}
public class Dog : Animal
{
//all fields of animal are here ez pz
}
what you would do in real life if you were running a zoo is something like this pseudocode:
record Animal {
string Name;
int Age;
string Species;
}
you certainly wouldn't go around adding a dog.bark() method or whatever nonsense they show in OO tutorials
That's one way of doing things, mine is less abstract.
How the frick is
supposed to be less abstract than
? Or are you talking about something else?
a dog is an animal, ok. But at the same time a dog can also be a family member, which isn't an animal. Or a dog could be an asset. Inheritance is just terrible at modeling the world, the world isn't hierarchical
abstractConcreteFactoryFactory
>his language doesn't support multiple inheritance
Multiple inheritance is not a good thing. It makes it just worse.
Use composition instead
So the dog contains an animal, a family member and an asset?
Yes. This design is way more flexible than any inheritance based approach.
>a dog can also be a family member, which isn't an animal.
Yeah, not with Christian imperialist patriarchy in charge. Agree with the rest for the most part. You can model it. It's just very complex. Think of things like a big relational database.
Man: ID, Name, age, hair color, eye color, height, statusID, etc..
Status-Man: StatusID, statustypeid, startdate, enddate
Man-Business: ManID, business id, begin, enddate
Employer: ID, employeeid = ManID, etc...
If I can put it in to a database, I can program for it as well. It just gets, again, really complex.
>[Dog] is a family member
Are you moronic? You don't implement it that way. You literally solved your problem in your sentence. "Dog is a family member" means "Dog is a member of family" which is the same as "Family has a dog" so an object of type Family should contain Dogs and Humans.
>dog can also be a family member, which isn't an animal
No shit. That's why you create a FamilyMember interface so that you can choose which Animals are capable of being family members and doing actions like love(), hug(), molest(), or whatever the frick. An abstract Animal or a subclass Mammal won't necessarily be family members so they won't implement the FamilyMember interface, but Dog and Human can be family members so those classes will implement the interface. The Family class should be made so that it can only contain objects that implement the FamilyMember interface.
This is pretty fricking simple and super easy to scale as you add more animals, and not just animals. Say you're one of those families that consider their Roomba to be a family member. All Roombas are robots, so Roomba will extend abstract Robot and get robot's methods. But, Roomba will implement FamilyMember so Family thehomosexuals will be perfectly satisfied having a Roomba among its ranks.
When I don't wanna retype the same method for a bunch of different classes
It falsely assumes that computers are supposed to model problems with non-computer abstractions.
this
It's not. Simple as that.
OOP itself isn't bad and, like other styles, has its place. The way people use it can be bad and it often leads people down the wrong path. Often because they don't strictly enforce single responsibility. Many languages also have a lot of overhead defining classes (e.g C++) making it less appealing to create lots of classes to maintain that single responsibility. It's useful/interesting to fire up one the Smalltalks (Pharo, Squeak) and browse around their class hierarchies. Those frickers like it wide and deep.
I agree. The problem is not OOP as a concept itself, but how it's implemented. It can be a pain in the ass depending on the tool.
I swear that most people that hate OOP are failed C++ devs, although C++ is also part of the problem with it's "jack of all trades, master at none" mentality that misleads a lot of people.
Haskell-style typeclasses are the right replacement for inheritance.
fpbp
I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters.
Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.
Why is putting functions into global namespace a good thing?
People tried that in C and ended up making function names like thing__action(thing).
he didn't say anything about avoiding namespaces, dummy.
namespaces are useful, but coupling them to objects is stupid
Coupling them to objects is good when it makes sense semantically, which is often.
Nope. Still better to separate functions from structs.
you can put them in the same namespace if you think they are related. But functions are related to structs by their argument types.
As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects. Because you have to make an arbitrary decision in which object to put them.
>As soon as a function takes two different objects, it already shows the shortcomings of putting them inside objects
I take it you have problems with human language grammar too?
>Why is putting functions into global namespace a good thing?
I never said that? Just because you aren't using object doesn't mean you have to regress back to a style without modules/namespaces. Put your functions into logical classes/namespaces/modules/whatever.
>Put your functions into logical classes/namespaces/modules/whatever.
Yeah, like attaching functions related to Thing into a namespace named Thing. Then you call Thing.action(thing). And then you realize you can avoid repetition with some sugar.
Surprise, OOP style languages have trouble writing and a non-OOP style. Scala fixes this by allowing you to create two different closures, one for the data (case class), and one for the functions (object). In this way you are assured that the things.action is as complete as action(thing) would be.
You can literally do it in most oop languages it is just pointless
Does not solve the problem you had
>Does not solve the problem you had
Wrong
>internal fields are phantom parameters
If you have direct access to them, then it is much easier to frick things up
For instance if a field is a pointer and whenever you set it to something else you want it to be deleted. You add some setter method that releases the resources first. This is bad because it hides the invincible parameter, apparently. However if you manually have to release it, and the field is referenced 99 times in the code, good luck finding the memory leak
Not having access to fields make correctness easier to achieve, not harder
Also, classes are rarely data. Sometimes they are, when you are representing sql for instance, but usually they are separated concerns and their state exists so they can do their job. This is why I hate the college example of classes because 99% percent of the time your class is some sort of manager or helper, that imports files or generates output, not data. It is much simpler to manage your program as if it were boxes of lego separated by color and function, meanwhile some people just want one big box of lego tht has everything dumped together since “looking into boxes is annoying”
'easy for the programmer to forget'
maybe you should try doing something else rather than programming, if you can't remember things
>I find that data as code just causes problems. For example, internal fields are like phantom parameters to all of the methods in the object, and it is easy for the programmer to forget that the method must also be complete in regards to these parameters.
>Much less problems arise when you just separate the code from the data. Store data in structs and records and pass them through static functions. Essentially instead of "thing.action()" you do "action(thing)". This alone improves the stability and readability of the code significantly.
git idiots
with their little 200 line attempts
nobody can program systems
if you program a system
you have a fking map of every single
fricking line of code
every single
fricking line of code
you know what. why where. you know what all the types are
you know what leads into what
you know what becomes what
you know what generates what
if you can't remember to that scale
forget programming
cos you forget
you want to know what 'the land of the forgot'
=
'legacy systems' is a term
of the wastage of the lost info
'windows'
'microsoft'
legacy companies aren't junk stock
shitheaps
microsoft
facebook
twitter
prime stocks
your economy is nothing
why the $ is no longer the reserve currency
you are fricking idiots
now
legacy code companies
microsoft
facebook
twitter
horrible messes
so funny
die america
the only stock is amazon
>I write difficult to understand code, not because I am shit at writing code, but because I am superior in intelligence
It is so transparent.
Created in California
Black females always have an ugly gorilla face unless they are mixed
The frick is wrong with you
I cant believe heckin racism still exists in 2022
its here and its in /misc/
it is all americans. white americans.
We need to kill them all for reparations
putin will do it
It don’t even have anything to do with the thread
because people don't know how to use it
It's cool if you have everything planned out before writing the code.
Later adjustments in OOP are PURE HELL.
Human Black person
Black person.iq = 65
It should be
Black person.getIQ(); // you get 65
why is name an object but email and address are properties
why do you identify yourself with your name instead of your address?
because your name is more consistent, and your address can change all the time
trick question they're all String objects
Do people hate OOP or do they actually hate Java? Java has an extreme over-reliance on OOP to the point where 50% of your code is boilerplate.
Before IQfy I hated OOP but now hate solely Java
java. created for masochists by masochists.
a worthy successor to 'C'
it's not, but if your language is based entirely on classes, as in no procedural functions unbound to a class, then it's a shit language. ironically, c++ got it right before java did, but nobody cared yet. every moron thought that java shit was the future, but now they are basically reverting back to c++ but better(GC, type safety, whatever)
What is Object Oriented programming?
Genuinely: which of the supposed features of OOP are actually OOP:
>encapsulation
Modules provide this in non-OOP languages
>polymorphism
OOP only provides an extremely weak type of polymorphism called subtyping-polymorphism. parametric polymorphism is much more powerful. Java and C# have both implemented parametric polymorphism (called generics in Java/C#) and ad-hoc polymorphism (via interfaces), but those features came from the ML world.
>data abstraction
As anyone who has ever programmed in a non-OO language knows, this is not limited to OOP.
>inheritance
Actively discouraged by OOP-advocates ("composition over inheritance")
>dynamic dispatch
This really just amounts to first-class functions, popularized in the 1960s by lisp before simula
>message passing
This may characterize smalltalk, but is never used in popular OOP languages today except in the context of implementing parallelism
So the question remains: what properties/features actually define OOP?
OOP is a paradigm, not a "feature set"; you can't define it just by a list of features
how is it defined then?
I could define functional and procedural programming quite easily:
functional: programming using function composition where definitions are referentially transparent and functions are first-class
procedural: programming where series of computational steps are arranged into procedures which may called anywhere in the program, including recursively in the procedure definition
why is object oriented programming so difficult to pin down and give a non-ambiguous definition?
in principal, OOP is a paradigm where you define related state (as fields) and behavior (as methods) into classes, which you then can instantiate (as objects). then one object can interact with another object, e.g. instantiate a new one or call methods of another; and each object/instance, even of the same class, has its own private state
the difficulty to define OOP in a generic, standalone manner probably comes from the fact that it's quite abstract by itself, so you would be heavily leaning to explaining by example or by comparison.
OOP examples are pretty much always garbage, especially the "Dog extends Animal" example as it focuses only on inheritance, and is an example detached from programming (you don't program Dogs).
if you were to compare it to procedural, then both are imperative (i.e. you define "how" to get your result, opposed to declarative where you define "what" you want as your result), but OOP has much tighter scoping of state and behavior, because each method or field belongs to a specific class (opposed to procedural where a function just "is" and you're not constrained in accessing it)
both of your definitions are ambigious and / or wrong (FP doesn't need composition and PP doesn't need recursion)
All these paradigms are ambigious, OOP just more so
show me a non-trivial program written in functional style which is not compositional?
even seemingly imperative let-bindings are disguised function composition.
let x = f p in g x
is equivalent to
(x -> g x) (f p)
OOP isn't inherently bad, you can write obtuse code in any language. The problem is that bad programmers who are inevitably introduced to the paradigm will try and use it everywhere whether it's needed or not. You can find hefty tomes about what design patterns OOP enables and it's not always easy to explain that often the best way forward is to ignore them and keep it simple unless you have a real need to do so.
you can write obtuse code if you are post 30 out of your shit sales career. trying to get in. and not having a fking clue what oo is. not having learnt the right way. having learnt the easy way. and you will never learn unless you learn the hard way, unless you go through the fricking mill. = processsing, seeing every line of code execute. doing it manually, in your head. idiots. losers. seeing sales people disintegrate because their fricked organisations implode, is funny.
die.
Nope, it's great and should be used everywhere.
All other paradigms lead to unmaintainable code.
> oop bad
its bad cos failed brainlets (mainly infesting IQfy looking for clues) can't grasp the concepts behind it
according to the other thread I was in OOP isn't bad its just that it makes devs break up their code in a million places and spagettfiys it making it shit
as long as you use an IDE (and you should), navigating split code is a cinch, and broken up code is actually much easier to read than 100+ LoC functions, which is the real spaghetti
Broken code reduces coupling. You're literally forced to write code that doesn't break when when someone changes a variable somewhere.
>class: Human
>objects: Name
what
Gotta pack things like pronouns somewhere
An example of exceptions being dumb in java would be that a java program always catches exceptions whether you program it to or not.
Increasing the actual program complexity, and slowing the program down.
Just don't write in Java if speed is an issue, bro.
what
you don't have to catch any exceptions in Java, you can instead just throw them further, even right up to and over the main() method
you should catch exceptions only if you have good intent on handling them at that specific location in code, otherwise always throw
>objectifying women
Sounds pretty based to me.
Things fall into multiple classes and it's hard to categorize.
> Inb4 multiple inheritance
What is a "Human" class knowing anything about sending email?
I blame the Clean Code Cult.
> I blame the Clean Code Cult.
Random statement which makes very little sense.
Sounds like something out of Twitter
I like OOP. I don't use inheritance at all.
Because its not FP
FP is moronic, though.
Why?
Filtered
FP sucks
t. worked at fintech company using F#, they all fricking hated it and did everything they could to get away from it.
I've never seen people use F#, but the first reason it sucks (but might be useful for some) is .NET.
What else went wrong?
They were using F# for some things and C# for others. So littered throughout the C# code were these awkward fricking F# objects.
Also most devs were C# devs including myself, we couldn't understand the F# code and didn't see the point in it anyway. It has very little industry adoption and dosent solve any problems C# can't also solve. Basically it's almost as useless to learn as some company specific DSL. That's the real problem with F#. Most people don't want to learn something semi useless.
Ah, so it wasn't fully F#. Why even start with it in the middle of the project? Awkward indeed.
It was 1 guy years ago who wrote all the F# stuff and pushed it heavily. Way before my time. Im guessing nobody else was onboard with F#. He also made the borderline insane Winforms code the company was using.
Filtered and happy 🙂
you got filtered
imperative programming should never have been invented in the first place, that way we would have kept brainlets and pajeets out
help, where is the new class button in pyCharm
> Why is OOP bad?
Depends. Most people will argue about inheritance, or dependency hell, or polymorphism, or whatever, but when it comes down to it, OOP's biggest issue is one of definitions. There are 100 mutually exclusive approaches to OOP, all of which competing to be "the real one." Its hard to talk about why "its" bad without defining which version(s) you're referring to.
This is the only article you'll ever need to read to debunk OOP. http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end
Now sit back and watch morons squirm and foam at the mouth trying to badly refute it.
404 bastard
Horrible cope.
>read this complete strawman of an article
>haha also it's unrefutable, good luck making any points against it
you don't even deserve a (You)
oo is bad because brainlets
people like erm 'bill gates' dont understand it
so they therefore say it aint the true path
if youwant to know what trying to do an OO system without oo looks like, look @ 'windows'
gates aint smart. u dont have to be smart if you are 'privileged' you can be fking anything
programmer. biochemist. pedophile. cuck
Oop is literally just putting structs and methods into smaller namespaces so the code is more human readable and errors are easier to find
Thats it
oo is nature
see a plant
make tht
make a fking mess in C
gates saw a plant at xerox parc
he tried to recreate it
in C
without oo
'the dark ages of tech'
pcs are the junk
pcs are the same garbage shin barking tin boxes
dirty fking crap. power sucking idiocy
they were in the 80s
that is gates thats what he achieved
apart from fricking a few 12 year olds
Learn to speak English
get nuked
worthless american shit
oo is 'structure'
gates interviewed early 00s
'your biggest regret?' put to the idiot
'WINFS'
= never got it
never got a system
never 'structured'
The name is not an object of the human
The name is a property of a exterior system, who gives that human a name.
You could say that human has a self proclaimed name, then it belongs to him
Humans don't have methods. A human can't send an email, it can interface with a computer to send an email
The problem with OOP is that people think objects can do things (model), which is a lie. Objects do not do things, they do not have models, objects ARE things, and they can interface with other things to create something (which are systems of relationship of objects)
The idea that objects have models is the most stupid decision ever and it ruins everything
> are things
state machines
>make a UI building block like a textbox
>another one which displays pictures
>99.99% of the code is the same (50000 lines)
>make both inherit from some uiEement whatever base class
Or
>have some basic feature like a menu
>use it in a different program
>now it requires one thing to do something slightly different
>make it a virtual function and override the behaviour
This is how inheritance is used in the real world, and it is very handy
The fact that so many people are so obsessed with college grad “class Dog : Animal” tier examples proves none of you have any work experience or do some archaic shit C or Delphi
>inheritance based UI toolkits is the killer app of OOP
Self pwn you love to see it.
IDEs have created a generation of people who can't program
I like to do external polymorphism. It's non-intrusive as it doesn't force you to inherit from a base class or add member functions. As long as free function exists with the correct signature, you can store it as a polymorphic type (like rust's Box). You can also make your model implement a non owning polymorphic reference or use a small buffer to store the type inline instead of using unique_ptr.
#include <iostream>
#include <memory>
#include <cmath>
class Shape2D {
struct concept_ {
virtual ~concept_() = default;
virtual double area_() const = 0;
virtual const char* name_() const = 0;
};
template <typename T>
struct model : concept_ {
model(T&& val) : value(std::move(val)) {}
double area_() const override { return area(value); }
const char* name_() const override { return name(value); }
T value;
};
public:
template <typename T>
Shape2D(T&& v) : self_(std::make_unique<model<T>>(std::move(v*~~ {}
friend double area(const Shape2D& s) { return s.self_->area_(); }
friend const char* name(const Shape2D& s) { return s.self_->name_(); }
private:
std::unique_ptr<concept_> self_;
};
struct Circle {
double radius;
};
double area(const Circle& c) {
return M_PI * c.radius * c.radius;
}
const char *name(const Circle&) {
return "circle";
}
struct Rectangle {
double w, h;
};
double area(const Rectangle& r) {
return r.w * r.h;
}
const char *name(const Rectangle&) {
return "rectangle";
}
// Not a template
void print_shape(const Shape2D& s) {
std::cout << name(s) << ": area = " << area(s) << 'n';
}
int main()
{
Shape2D s0(Circle{2.0});
Shape2D s1 = std::move(s0);
Shape2D s2(Rectangle{1.5, 4.0});
print_shape(s1);
print_shape(s2);
}
It produces spaghetti code.
OOP is fine if it is the OOP invented in languages like Lisp and Smalltalk. Java is corpo bubble OOP which is a regression.
because they say so on IQfy
Class: Human
Sorry, president Hitler declared blacks as non-human you have to refactor.
Based Java treating women as objects
they're either objects or fricking evil over the hill b***hes.
>email is a property of human
One of the fundamental issues with modern structure is it's misuse.
because i say so
What did you say about OOP?
frick off
or learn to program idiot
bump
class Flying
class Walking
class Bird inherits from Flying
class Sparrow inherits from Bird
class Ostrich inherits from Bird
But Ostrich doesn't fly, Ostrich should inherit from bird, but not all birds fly. Do we have a class Flying and a class Walking, and have no class for Birds? All birds lay eggs, so how do we reuse egg-laying code for both Ostrich and sparrow, but not for Bats, which inherit from flying but are not birds and do not lay eggs?
interface Flying
interface Walking
class Bird
class Sparrow inherits from Bird, implements Flying and Walking
class Ostrich inherits from Bird, implements Walking
class Bat implements Flying
Interfaces are neat, but they aren't sub typing polymorphism (aka OOP polymorphism), and come from functional programming, not from OOP: ad-hoc polymorphism was introduced by Wadler and Blott to Standard ML in 1989. So it's hard to argue they represent OOP. Sure OOP langaues have them, but Java also has anonymous functions and c# has list comprehensions, but it would be difficult to argue that these weren't functional features embedded in an OOP langauge.
Also, why not make Bird an interface as well?
Why not do away with class inheritance entirely, and have only standalone class definitions and interfaces like Haskell and Rust?
Also, in haskell and Rust it's possible to do something like this
interface EggLaying<T>
interface Bird<T> where T implements EggLaying
Requiring all types that implement Bird to also implement EggLaying. Is that possible with Java interfaces?
>Also, why not make Bird an interface as well?
Maybe it contains body parts that all birds have.
interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface
>Also, why not make Bird an interface as well?
given no context what Bird's purpose is, it could be either interface or class
it might, or might not, have fields reused in the classes extending it
>Is that possible with Java interfaces?
if you mean interfaces extending other interfaces, yes that's possible in Java
for example https://docs.oracle.com/javase/8/docs/api/java/util/List.html
>interfaces are not "ad-hoc polymorphism", interfaces are contracts to deliver implementations for specified methods that declare implementing the interface
You just described ad-hoc polymorphism.
quickly reading up the definitions on wikipedia, no, it's not - the interface polymorphism comes from the other direction than what's described as "ad hoc polymorphism" (function/operator overloading)
override void fly():
return
>properties doesn't include float Black person 0.0-1.0
Curious
OOPs
I did it again
Got lost in the game
Oh baby oh baby
if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.
>if you aren't writing exclusively functional software your shit is probably, bug infested and slow as frick. Memory is cheaper than compute power so make your data immutable and enjoy thread safe moron strength speeds.
I'm working on an Elixir project started by two morons and it's just as buggy, slow and nasty as any other codebase. FP doesn't protect you from shit code, no paradigm does.
>muh birds
>muh person
I wish colleges would stop doing this
They are terrible examples
The reason for these perverse examples is that graphs of objects is a better model for dogs and cats than it is for computations.
OOP is not good for computations, they are there to make writing correct code easier
because it forces you into the "every program is just a database + interface" mentality.
It makes you efficient at the cost of your creativity.
OOP as a set of features is useful and so are the basic principles of OOD (loose coupling, high cohesion). Some people worry too much about "correct" OO architectures rather than useful ones.
Name a language that is actually helping the industry.
Rust
Helping the industry by reducing the number of candidates you compete with for a job opening by 41%? that's actually pretty based
sfdgdfgsdfg, fgsdfgsdfg.
> dfigojsdfgo isjfg
It's not, it's just misused
>inheritance is bad
>frameworks are good
same thing conceptually, morons. Reminder 90% of "developers" are awful at their jobs and are the equivalent of 1950's typists that just copy/paste code and don't actually design anything
Based computer science recognizes that women are objects.
It's not inherently bad, it just ends up being the goto solution in cases where it really doesn't need to be.
OOP is the best way to group methods together which operate on the same data.
>Methods
Cook
Clean
SKIN: BLACK
because brainlets can't into it without writing shit code
/thread