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…
Yes, but I/O is impure and sequentially dependent, unlike mathematics. Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad being the "leaky abstraction" of the FP world. Then OO is not a bad solution to an irrelevant problem, but a pretty-good solution to a bad relevant problem. EDIT: To clarify: The "problem" is change. Imperative programming relates sequential device-change over t…
Object-Oriented Programming is Bad (2016) [video]
101–110 of 133 posts
Re: Object-Oriented Programming is Bad (2016) [video]
#102Earlier quoted context omitted.
Oop is slower than functional in many cases. The highly optimized java stack isn’t that fast and still uses oodles of memory. And then there’s languages like ruby which are practically slower than writing shell scripts.
Functional generates tons of garbage and requires a very good concurrent generational tracing GC, more so than OOP languages. Only thanks to researchers like Simon Peyton Jones[1], did functional language compilers improved their code quality. [1] - https://www.microsoft.com/en-us/research/publication/the-imp...
Re: Object-Oriented Programming is Bad (2016) [video]
#103I 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…
Ruby and Swift (and other languages I'm pretty sure) allow you to have named functions nested in functions
Re: Object-Oriented Programming is Bad (2016) [video]
#104Earlier quoted context omitted.
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…
http://paulgraham.com/avg.html
Re: Object-Oriented Programming is Bad (2016) [video]
#105Earlier quoted context omitted.
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…
A fair bit of that can be easily explained as cargo cult - a fair number of developers simply believe, because it's how they've been taught and what's been stated as fact over and over and over, that OOP is just 'how you write code'.
Re: Object-Oriented Programming is Bad (2016) [video]
#106The 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…
Re: Object-Oriented Programming is Bad (2016) [video]
#107Earlier quoted context omitted.
http://paulgraham.com/avg.html
But Lisp's object system is kind of famous. Where are the people beating the averages in pure fp languages? There should be a lot of really amazing software if fp is as good as it's made out to be and employed exclusively by elite non-blub programmers. There really isn't though, except maybe in finance where F# is doing quite well. And that's great but even F# is multi paradigm.
Re: Object-Oriented Programming is Bad (2016) [video]
#108The irony of the anti-OOP bashers is that all successful GUI frameworks are OOP based, even those written in non-OOP languages like C. Likewise all the functional programming languages that get used as example, are also not pure FP, rather multi-paradigm, also supporting concepts from OOP. "FP vs OOP: Choose Two by Brian Goetz" https://www.youtube.com/watch?v=HSk5fdKbd3o
GUI frameworks have always been OOP-based because everybody was copying Xerox Parc. But even the most successful were not always easy to use (composition and control-flow/concurrency being particularly awkward). Modern GUIs are all based on HTML/CSS these days anyway and certainly not always OOP, as demonstrated by frameworks such as react.
Re: Object-Oriented Programming is Bad (2016) [video]
#109Could we please stop this kind of useless statements? Aren't we developers supposed to be scientific-minded? There is not such thing as "bad" or "good" in absolute. There are paradigmes that work better in certain contexts - and I use the word "context" in very general way here - and some that work worse. If my consulting experience has taught me something, is that "it depends" is a valid comment most of the time. By…
Re: Object-Oriented Programming is Bad (2016) [video]
#110I 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…
Also I think the mention of golang is telling which I think is an implicit bias in his preferred style reccomendations.