Directory | Tags | Index | LinkIt | Submit   | Help
    Friday, 01 August 2014 - anonymous
Login/Register to vote and to have access to more features

You are here: Root > Programming Languages > Common Lisp > Metaobject Protocol

Revisiting the Visitor: the "Just Do It" Pattern.
Created by didier on: Tue, 28 Apr 2009 08:07:14 GMT, Last modification: Tue, 28 Apr 2009 08:07:14 GMT

A software design pattern is a three-part rule which expresses a relation between a certain context, a problem, and a solution. The well-known "GoF Book" describes 23 software design patterns. Its influence in the software engineering community has been dramatic. However, Peter Norvig notes that "16 of [these] 23 patterns are either invisible or simpler [...]" in Dylan or Lisp (Design Patterns in Dynamic Programming, Object World, 1996).
We claim that this is not a consequence of the notion of "pattern" itself, but rather of the way patterns are generally described; the GoF book being typical in this matter. Whereas patterns are supposed to be general and abstract, the GoF book is actually very much oriented towards mainstream object languages such as C++. As a result, most of its 23 "design patterns" are actually closer to "programming patterns", or "idioms", if you choose to adopt the terminology of the POSA Book.
In this talk, we would like to envision software design patterns from the point of view of dynamic languages and specifically from the angle of CLOS, the Common Lisp Object System. Taking the Visitor pattern as an illustration, we will show how a generally useful pattern can be blurred into the language, sometimes to the point of complete disappearance.
The lesson to be learned is that software design patterns should be used with care, and in particular, will never replace an in-depth knowledge of your preferred language (in our case, the mastering of first-class and generic functions, lexical closures and meta-object protocol). By using patterns blindly, your risk missing the obvious and most of the time simpler solution: the "Just Do It" pattern.

Document location: http://www.lrde.epita.fr/~didier/research/publis.php#verna.09.accu

Authors

Didier Verna

Tags

Metaobject Protocol | CLOS | Common Lisp | C++ | Papers | Object-Oriented | Learning | Information

0 Notes and 0 comments

0 Notes

You must be logged to add a note


0 Comments

You must be logged to add a comment