std.patterns: it was about time
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Wed Feb 11 16:29:36 PST 2009
Andrei Alexandrescu wrote:
> In wake of the increasing power of templates in D2, I am starting the
> std.patterns module, which is to contain boilerplate for a number of
> common design patterns (as in the GoF book). For now I'm adding a
> Visitor implementation, which was lying in my codebase for a while.
>
> http://ssli.ee.washington.edu/~aalexand/d/web/phobos/std_patterns.html
> http://ssli.ee.washington.edu/~aalexand/d/web/phobos/std_patterns.d
>
> Comments and suggestions are as always welcome.
>
>
> Andrei
It was, indeed, about time.
Simple as it is, you might as well toss a Singleton mixin in there. Its
so common and so insanely simple that there may as well be an "official"
one.
Observer should be an interesting one to try implementing. It could
make use of signals/slots to good effect. The question there is in
whether one is to observe a Foo or a particular property of a Foo. Both
should probably be available.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d
mailing list