Hacker News new | ask | show | jobs
by Zababa 1772 days ago
Isn't "Design Patterns" about how to solve problems through an OOP approach, rather than about the strict benefits of OOP?
3 comments

More a bag of tricks to get around issues you tend to run into when doing OOP.

Bridge comes to mind, I ran into that specific example myself trying to OO-design a GUI framework with different back ends.

With a pinch of common sense stuff like Facade etc.

Much of it only makes sense for static languages such as C++ and Java.

I'd say it gets way more credit than it deserves.

Stepanov on OOP is interesting (just search for object oriented):

http://www.stlport.org/resources/StepanovUSA.html

Article's stated motivation:

> I'm looking to gain more confidence in my criticism and understanding of OOP. In the past, I have published multiple posts criticizing Object Oriented Programming ... I always feel this anxiety that... maybe there is such a thing as “good OOP”, maybe all the OOP code I wrote, and the OOP code I keep seeing here and there is just “incorrect OOP”.

To that I'm saying read DP and critique that and if you still feel that way, your on to something. Cherry picking 3 crap OOP books to critique then concluding OOP is crap feels like a bit of a strawman argument.

I don't know anything about the other two books, but the one discussed in depth is well-respected.

http://www.growing-object-oriented-software.com/praise.html

Again, I'm saying that I think DP isn't a good idea because DP is about how to solve problems using OOP and not why OOP is a good idea in the first place.
I don't think you can separate the two. To understand whether OOP is a good idea you need to understand how it's used to solve software problems.
I don't think those are the same "problems". "Design patterns" is about code, not solving business problems. To stay in the well known books in OOP, DDD would be about solving business problems.
"business problems"? I feel like the goal posts are moving here. EOD all I'm saying is I didn't really understand or appreciate OO until I'd read and digested DP. Until you've at least covered those basics it's hard to have an opinion on whether OOP is crap or not in my view. But maybe I've just been indoctrinated by it.
Many of the Design Patterns emerge from the fact that a given language does not have first class functions AKA closures AKA objects. So in a way it is working around the limitation of a language not being object oriented enough.