6 ms·
Not that I agree with him, but I do understand what he meant by that, and might be able to explain slightly: many people believe that "design patterns" are some
by saurik 15y ago
Not that I agree with him, but I do understand what he meant by that, and might be able to explain slightly: many people believe that "design patterns" are something that languages like Java (quite in particular, this language is held up during these conversations) require to work around design deficiencies.
Arguably, this is true: many of the patterns simply "fall away" if you have access to features like multi-method dispatch (Lisp+CLOS), message passing with transparent proxying (as in SmallTalk, and to some extent Objective-C), or continuations (Lisp/Scheme).
However, the argument often goes even further into the realm of complaints against "all kinds of patterns, even those that tend to exist in all abstractions, even mathematical ones", deriding things like factories as "overly-complex" (in the same concept of "overly-complex" that make some people choose NoSQL over RDBMS not for scalability, but due to the common lack of schemas).
- dfox 15y agoFactory is actually perfect example of pattern that is mostly used to overcome the fact that passing classes around is unnecessarily complex in Java and thus it's favorable to wrap code calling constructor in it's own class and pass instances of it. In "dynamic" languages (including ObjC) you can simply use use the class object (and if the need arises: things that behave like class objects) itself instead of factory in most cases.