std.patterns: it was about time
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Feb 1 11:04:42 PST 2009
Andrei Alexandrescu wrote:
> Ary Borenszweig wrote:
>> Andrei Alexandrescu escribió:
>>> 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.
>>
>> It's nice to implement patterns with mixins, like Singleton in my video.
> [...]
>
> Thanks for sharing your insights. So far Visitor is concerned with I
> disagree with the "automatically" here. Visitor has one purpose in life:
> you call accept() with the appropriate visitor, it calls visit() back
> with the appropriate type.
Heh, I've mixed up copy and paste across a draft response. You may want
to ignore the ``I disagree with the "automatically" here.'' part. I meant:
Thanks for sharing your insights. So far Visitor has one purpose in
life: you call accept() with the appropriate visitor, it calls visit()
back with the appropriate type.
Andrei
More information about the Digitalmars-d
mailing list