3 ms·
I've heard design patterns described as "missing language features" and when you look at the GoF book, many don't make sense in languages other than C++ because
by pfranz 6y ago
I've heard design patterns described as "missing language features" and when you look at the GoF book, many don't make sense in languages other than C++ because they're already built-in or unnecessary.
If you're looking for a newer book on design patterns, I've heard Head First Design Patterns (2004) suggested as much more approachable. The cover image is a bit goofy and screams mid-2000s. I've only seen excerpts, but GoF if I remember correctly is very dry and doesn't explain some things very well. Head First Design Patterns looks to be written for Java, but I don't remember having trouble understanding and implementing them in other languages.
Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software 2nd Edition will be released on December 29. I guess this is the newer edition? It shares 2 of the authors.
- dblohm7 6y agoA lot of that stuff isn’t necessary anymore in Modern C++ either.
- rualca 6y ago> I've heard design patterns described as "missing language features" and when you look at the GoF book, many don't make sense in languages other than C++ because they're already built-in or unnecessary. I've heard that statement before and it really never made any sense to begin with. Design patterns describe higher-level concepts. Just because a higher level concept made its way into a standard library that doesn't male it go away, nor does it eliminate the need to reason and have higher level discussions involving it. Take for example C#. Does it make sense to talk about event loops in C#? Or observers? Or callbacks? Because those are all design patterns, aren't they? Great, you don't need to add a lot of boilerplate code to get to use one, but you're still using the concept and reasoning about the system in terms of these patterns and their features and properties, right? Just because I can buy a ready-made roof instead of having to cut down trees or buy the wood somewhere, that doesn't mean that a roof is no longer a roof.
- x87678r 6y agoI agree it isn't about the language features, but designs have changed a lot. 2nd ed could be great - thanks, I'll try to get a copy when the price settles down a bit.