3 ms·
Well, although the syntax/idiom is different, the design pattern is the same the Observer pattern. IMHO, design patterns transcend language idioms and enable p
by vicaya 17y ago
Well, although the syntax/idiom is different, the design pattern is the same the Observer pattern.
IMHO, design patterns transcend language idioms and enable people to understand/communicate higher level abstraction.
- durin42 17y agoThe difference to me has been that really great programming languages cause me to not notice my use of design patterns, because they become trivial. For example, Factories are basically nonexistent in idiomatic Python, because they're essentially free with the language.
- mattrepl 17y agoAs design patterns became popular in the world of statically typed, class-based OO languages that lacked first-class functions (C++, then Java and C#) there always seemed to be an emphasis on the implementation details, namely counterfeit function objects. The higher level abstraction aspects of a design pattern are usually better expressed without introducing codewords. E.g., the Observer pattern is just, "let's call a function on objects that want notification." It's the baggage that comes along with implementing these abstractions in blub that justifies a name as a pointer. Related to the above, design patterns connote boilerplate; all that generic code that's needed to setup the pattern in blub.