[fpc-pascal] Visitor pattern (was: Weird interface behavior)
Juha Manninen
juha.manninen62 at gmail.com
Mon Jan 24 11:35:27 CET 2011
Michael Van Canneyt kirjoitti sunnuntai 23 tammikuu 2011 17:41:13:
> On Sun, 23 Jan 2011, leledumbo wrote:
> > WARNING: it won't be simple
> >
> > I'm using visitor pattern in my project and to the best of my knowledge,
> > the visitor should be implemented as an interface.
>
> Why ?
> tiOPF uses the visitor pattern extensively, and it is implemented as a
> class.
Is this visitor pattern something that I should care about?
I have programmed quite much and never needed it.
I found many Java examples from internet and they all were good examples of
"over-engineering" IMO. A simple thing made complicated.
Virtual methods or method references (kind of event handlers) solve those
cases in a cleaner way.
Guess I need to study tiOPF finally. It is on my ToDo list anyway.
Juha
More information about the fpc-pascal
mailing list