Patterns and Compositionality
Jim Little
jiml@inconnect.com
Thu, 27 Jan 2000 13:38:41 -0700
This is exactly the point I was trying to address in my original post:
Massimo Dentico wrote:
> *if* the substitution process (generalizing/inlining) for
> patterns in OOD is equivalent to the substituition process in
> functional/logic languages (pattern matching) [...]
It is not equivalent.
Design patterns in OOD are not substituted, generalized, or inlined.
The concept has no meaning for design patterns. Design patterns are a
way of communicating knowledge. They're written in natural language for
use by human observers. To use a design pattern, you read it,
internalize it, and intuit its applicability to your design. Good
design is a matter of communication and understanding, not
functionality, and as such it simply can't be formalized or automated.
As a tool for communicating "good design," neither can design patterns.
Comparing design patterns to pattern matching in functional languages is
a fallacy. They are not comparable.
Jim
PS: I'm not trying to address the rest of the discussion -- I'm just
trying to clear up a pretty strong misunderstanding about the nature of
design patterns.