Content deleted Content added
m Signing comment by GlenPeterson - "→Not confined to language processing: new section" |
GlenPeterson (talk | contribs) |
||
Line 59:
== Not confined to language processing ==
The point of design patterns is to recognize general patterns so that they can be applied anywhere. Unfortunately, the description of this pattern seems to be unnecessarily tied to a specific example both in the GOF book and in this article. A good counter-example would be to use a class hierarchy
A more general and useful definition might be a "Rules Engine" as [http://www.oodesign.com/interpreter-pattern.html OODesign.com] suggests. Really, it's a tree data structure of functional objects (each implementing the same single method). The functional objects "rules" delegate to one another until a terminal object (rule) is reached. The objects could be related through an interface and through the logic in their single implemented method instead of through an object-oriented inheritance hierarchy.
If no-one finds somewhere that this has already been stated clearly, I can add it to my blog and someone who doesn't know me can come along some day and use that as a source to improve this article. --[[User:GlenPeterson|GlenPeterson]] ([[User talk:GlenPeterson|talk |