Why Are So Many Developers Hating on Object-Oriented Programming?
I don&#x27;t think OOP itself is bad. Bad abstractions are bad, no matter the language, and that is the main problem. Abstractions and domain models are created based on our understanding of a given problem as well as what is possible within a certain programming language&#x2F;paradigm. Most of the time, we initially do not have a good understanding of the domain we are working in, and because we are conditioned to keep code &quot;organized&quot;, we tend to fall back to established &quot;patterns&quot; (which OOP has an abundance of...), but these almost always end up being the wrong abstraction. By the time we figure this out though, it&#x27;s already too late to change it.<p>A functional language such as Haskell tend to make us think a little bit more about what abstractions we use, because they are such an integral part of the language you can hardly do anything without them. We can &quot;converse&quot; with the compiler to come to a better understanding of how our code should be structured. You usually end up with a better domain model. However, this can also be very limiting. Lack of control of execution and no control of memory layout is a problem in my domain (video games). It&#x27;s also slower to develop for because you can&#x27;t take &quot;shortcuts&quot;, which can be helpful to get something up and running without having to understand the problem domain.<p>I still use OOP daily (C++), but I never start out with abstractions when writing new code. I tend to create C-style structs and pure functions. Eventually, I will have a better understanding of how this new module should be organized, and will make an API that is RAII-compliant and whatnot. I think you can easily write clean code in OOP as long as the abstraction makes sense.