The problem for me in regards to OOP is the complexity related to the management of state. OOP encourages mutability and understanding the state of an object as its methods are called can be confusing when additional internal (and often times, private) methods are called. In functional programming, state is something acted upon by functions. It is as simple as f(x) = y. Reasoning in functional programming is much clo…
In theory this sounds great but in reality every major application, game, operating system and even website is written in an OOP style. Why is that? People should first answer that question. Yeah, real existing software has flaws like every other thing in reality but at least it exists unlike a significant piece of fp style software. I like fp and I think it has a lot to teach but I think it's a bit presumptuous to a…
Object-Oriented Programming is Bad (2016) [video]
61–70 of 133 posts
Re: Object-Oriented Programming is Bad (2016) [video]
#62Earlier quoted context omitted.
I think one of the reasons anti-OOP opinions are so strong is that OOP was promoted as the end all savior of programming. At my University it was dogmatically emphasized. "OOP" (e.g. subtype polymorphism) is useful for some problems, but worthless and kludgy for others; it's a hammer pounding lagbolts. A generation of programmers (mine) missed out on the richness of Lisp/ML flavored languages. I didn't really come to…
interestingly Lisp/ocaml/clojure rank low in popularity, clojure shows it’s not because of libraries. That has to mean something other than libraries or unenlightend people. Idk maybe there is too much complexity in those languages and philosophy
I'd argue that those languages don't see as much use in great part because they are not the first languages people are exposed to, and therefore most decide it's not worth the effort to learn them.
Re: Object-Oriented Programming is Bad (2016) [video]
#63In my experience, the thing that's wrong about object-oriented programming is not the object-orientation itself, but the over-application of it. - Sometimes more "procedural" programming provides better clarity. At other times, object-orientation is a cleaner approach. Neither should be a replacement for the other at all times. - The idea that objects should reflect how we think of real objects in the physical world…
Well duh. We’ve been sold object oriented platforms for decades with the insistence that everything is an object, hiding its internals from the world. There was tepid support for representing plain data. At the heyday of the madness people were busy building object-over-network abominations like CORBA. Even today, the most popular enterprise platform, Java, does not support value types. In the free world, the widely…
Re: Object-Oriented Programming is Bad (2016) [video]
#64The problem for me in regards to OOP is the complexity related to the management of state. OOP encourages mutability and understanding the state of an object as its methods are called can be confusing when additional internal (and often times, private) methods are called. In functional programming, state is something acted upon by functions. It is as simple as f(x) = y. Reasoning in functional programming is much clo…
Re: Object-Oriented Programming is Bad (2016) [video]
#65In my experience, the thing that's wrong about object-oriented programming is not the object-orientation itself, but the over-application of it. - Sometimes more "procedural" programming provides better clarity. At other times, object-orientation is a cleaner approach. Neither should be a replacement for the other at all times. - The idea that objects should reflect how we think of real objects in the physical world…
Object orientation can provide a cute encoding of abstraction layers ala SICP to avoid dealing with a bunch of dangling functions:
Re: Object-Oriented Programming is Bad (2016) [video]
#66The problem for me in regards to OOP is the complexity related to the management of state. OOP encourages mutability and understanding the state of an object as its methods are called can be confusing when additional internal (and often times, private) methods are called. In functional programming, state is something acted upon by functions. It is as simple as f(x) = y. Reasoning in functional programming is much clo…
“Mental overhead is greatly reduced when you can assume that your data structures are immutable”. I’ve been reading lots of articles claiming that but I still haven’t understand how that’s so. If you have fifty functions all acting on the same piece of state, why would returning new objects instead of mutating would greatly reduce mental overhead? Isn’t there still mental overhead in tracking which of the fifty funct…
Re: Object-Oriented Programming is Bad (2016) [video]
#67Earlier quoted context omitted.
Well duh. We’ve been sold object oriented platforms for decades with the insistence that everything is an object, hiding its internals from the world. There was tepid support for representing plain data. At the heyday of the madness people were busy building object-over-network abominations like CORBA. Even today, the most popular enterprise platform, Java, does not support value types. In the free world, the widely…
isn't "object over network" basically microservices?
http://www-cs-students.stanford.edu/~dbfaria/quals/summaries...
Re: Object-Oriented Programming is Bad (2016) [video]
#68I really liked the first half - he provides some insightful thoughts on both why OOP doesn't quite deliver on the promise, and why it continues to be popular anyway. I am also becoming increasingly enamored of procedural programming as a default approach. Functional is also good - it's one of my first loves - but I find that it can be similarly prone to encouraging premature abstraction. Like OOP, that problem isn't…
Re: Object-Oriented Programming is Bad (2016) [video]
#69In my experience, the thing that's wrong about object-oriented programming is not the object-orientation itself, but the over-application of it. - Sometimes more "procedural" programming provides better clarity. At other times, object-orientation is a cleaner approach. Neither should be a replacement for the other at all times. - The idea that objects should reflect how we think of real objects in the physical world…
Well duh. We’ve been sold object oriented platforms for decades with the insistence that everything is an object, hiding its internals from the world. There was tepid support for representing plain data. At the heyday of the madness people were busy building object-over-network abominations like CORBA. Even today, the most popular enterprise platform, Java, does not support value types. In the free world, the widely…
There was even an unpleasant period of time in the 90's when people tried to make some of the Linux OS distro end-user apps run off of CORBA to bring about the interconnected "sea of objects" vision, slowing things down a lot.
No wonder OO style is widely overused.
It's overused in part, because it's easily sold. It's easy to make sound-bites out of the doctrine. At the same time, it's a bit nebulous and it's easy to describe all of reality this way at first glance. (That said, in the right hands, it can make for some dandy, clean software. The tricky part is the "right hands.")
Basically, software is organizational politics. Software methodologies are dogma, with nothing to back them up, except maybe some savvy design and at times some mathematics. However, these aren't sufficient to deal with the complexities brought in by business needs, the real world, and the complications of developer communities.
We're back in the alchemy days of the programming discipline. This is perhaps why minimalism often rules the day. Do as little as possible. Make do with as little as possible. Make apps and modules as small as possible. As much as possible, do no harm.
Re: Object-Oriented Programming is Bad (2016) [video]
#70Earlier quoted context omitted.
Well duh. We’ve been sold object oriented platforms for decades with the insistence that everything is an object, hiding its internals from the world. There was tepid support for representing plain data. At the heyday of the madness people were busy building object-over-network abominations like CORBA. Even today, the most popular enterprise platform, Java, does not support value types. In the free world, the widely…
isn't "object over network" basically microservices?