foreach/opApply is the visitor pattern

grauzone none at example.net
Sun Feb 1 09:48:40 PST 2009


BCS wrote:
> Correct me if I'm wrong but I thing that D's opApply is a form of the 
> Visitor pattern where the calling function's stack frame is the visitor 
> object.
> 
> This just occurred to me. Maybe I've been missing something re the 
> visitor pattern but I think this make for a nice, cool and easy way to 
> describe it. (Also I don't remember it being described that way)

More importantly, why does it matter?


More information about the Digitalmars-d-learn mailing list