4 ms·
> A lot of them are niche use or only really exist to cover lack of features in languages (...) This take is a reflection of a failure to understand the concep
by nuerow 5y ago
> A lot of them are niche use or only really exist to cover lack of features in languages (...)
This take is a reflection of a failure to understand the concept of design patterns, their usefulness, and their role in software engineering.
Design patterns are not features missing from a toolkit or language. This is perhaps the biggest miscomprehension regarding design patterns. It's immaterial if a language supports or not a given programming construct in it's core language or standard library. The whole point of design patterns is that they represent higher-level programming constructs that pop up often in implementations and are frequently used to address common problems.
Think about it for a second: do futures or promises or callbacks or sharex pointers cease to be design patterns or lose any usefulness if these features are supported by the core language? Is the observer pattern not a design pattern anymore in C# or Java once it was implemented into them as first/second class citizens?
Or do we understand what these techniques involve just by mentioning these keywords?
Clearly the main problem plaguing design patterns are those who feel entitled to criticize things they don't know and clearly failed to grasp even the basics.
- tester34 5y ago>Design patterns are not features missing from a toolkit or language. This is perhaps the biggest miscomprehension regarding design patterns. It's relatively popular opinion that some design patterns are used because some languages lack some features that can achieve similar stuff in "better" way. So what's design pattern in your opinion? For me design pattern is just approach to some specific problem, very often connected with some $implementation_example in order to communicate more effectively. Design pattern's purpose is to improve communication by naming solutions to "common" problems.
- nuerow 5y ago> It's relatively popular opinion that some design patterns are used because some languages lack some features that can achieve similar stuff in "better" way. You're confusing a couple of unrelated issues there. Just because you need to implement a design pattern if you want to use it with a language/framework that doesn't provide it's own implementation, quite obviously that does not mean that design patterns only exist if you implement them yourself. That's a terribly silly misconception, and demonstrates a misunderstanding of the very basics of what a design pattern is. Just to be absolutely clear, even Wikipedia defines design patterns as "a general, reusable solution to a commonly occurring problem within a given context in software design", and a "description or template for how to solve a problem that can be used in many different situations." What exactly is there in the definition that ties this to an implementation?
- tester34 5y ago>What exactly is there in the definition that ties this to an implementation? In definition nothing, but I believe there are very popular implementations (mostly one) of given design pattern that people are aware of and associate with given design pattern and I guess it may kinda improve communication? idk.
- snidane 5y agohttps://wiki.c2.com/?AreDesignPatternsMissingLanguageFeatures https://wiki.c2.com/?AreDesignPatternsMissingLanguageFeature...