Comments on Yegge's Universal Design Pattern
I had a chance to read through Steve Yegge's long post The Universal Design Pattern. Have you read it? It's quite long, but worth the time I thought.
The universal design pattern discussed in the post is the Properties Pattern where a simple key/value structure is used as the data model for a programming problem. A typical API supports getting, setting, deleting, and checking the existence of key/value pairs. Significant power is exposed by adding a parent pointer to the key/value map to allow inheritance.
An example that was not included, but that strikes me as good evidence for calling this a "universal design pattern" is the environment model of evaluation described in SICP:
An environment is a sequence of frames. Each frame is a table (possibly empty) of bindings, which associate variable names with their corresponding values. (A single frame may contain at most one binding for any variable.) Each frame also has a pointer to its enclosing environment, unless, for the purposes of discussion, the frame is considered to be global. The value of a variable with respect to an environment is the value given by the binding of the variable in the first frame in the environment that contains a binding for that variable. If no frame in the sequence specifies a binding for the variable, then the variable is said to be unbound in the environment.
That's all I've got.
Technorati Tags: programming
archived on 2008-12-08 in null
blog comments powered by Disqus
