What exactly is wrong with Object Oriented Programming?
Your mom
It's mostly used incorrectly. Subclassing things based on taxonomy and not code.
Also, most OOP languages don't even have any notion of covariance or contravariance.
>>52017836
in theory its pretty good idea
in practice no language implements it perfectly.
its also like a kind of cancer, its very easy to get swept up and refactor everything into its own class unnecessarily.
like everything, it has its place.
someone else post the kite example please
>>52017893
>>52017898
Is C# an example of doing OOP correctly?
>>52017908
No, it's nothing special.
>>52017861
Dr Juggs! That's a (jizz) blast from the past. Magnificent.
>>52017908
C# is a good example of doing everything badly
if you want a good implementation of oop stick to pseudocode
>>52017836
OOP is popular and effective, so naturally /g/ is vehemently opposed to it.
see >>52017935 for example
>>52017935
>C# is a good example of doing everything badly
In what way?
C# is easy and effective to use, pretty much anyone who has used it agrees.
>>52017966
Good point. Forgot how contrarian /g/(and all of 4chan) was.
well /NEET/?
>>52017836
it's bollocks
Its not bad but all real programmers moved on to a data oriented approach anyway.
>>52018331
What is
>define private public
>>52018363
DOD isn't really an alternative to OOP. It's only really applicable when OOP wasn't appropriate in the first place.
>>52017836
Once you master the composition over inheritance advocated by fowler, you see how powerful oop is.
>>52017836
because making everything a child/parent abstractions is stupid and constraining. design patterns have to be used to break out of this very monotone way of programming. languages not constrained by class types dont need design patterns
because using classes as a type system is constraining and makes code very static, module system should be used instead
>>52018621
It really irks me to know that most of the canonical design patterns are just workarounds for closures.
>>52017836
Nothing is wrong with it, just like nothing is wrong with GoTo programming.
The problem comes in when it is used badly, just like every single programming paradigm.
OOP is useful if you have really complicated objects with lots of code behind them. Inheriting an AsyncTask in Android for example is orders of magnitude more easy than coding a threading routine yourself.
But in other cases I have seen needless class inheritance which ends up making more work for little benefit.
OOP really requires a plan that is laid out in order to be good. If it is just winged out on the spot when most programming happens, it will probably crash and burn.
>>52018621
>what is composition
>what is dependency injection
do you have any idea what you're talking about?
How should I arrange my code in oop?
>>52018708
>>what is composition
its programming in a way that ignores class heirarchies, basically how you would program naturally if you werent stuck in an OO language
>>what is dependency injection
another pattern for creating functionality that is not contrained by OO types systems which does not come naturally to OO
>>52018761
Such that you're preventing code duplication and minimizing dependencies. Not so that your class hierarchy is a taxonomy.
Lmao do people on /g/ even program anything besides Fizz Buzz in haskell and rust?
>>52018089
The OOP in C# is definitely bad. It just copied Java, which in turn mainly copied the bad C++ OOP (which is really just OOP monkey-patched onto regular C methods).
Inheritance is harmful and should be dropped in favor of composition. Method overriding in big inheritance chains is *very harmful* and basically our generations GOTO statement. Theres also no proper way of doing Mixins.