Re: Type-safe iteration over the DOM in DOM 2 & 3?

>accept(Visitor v)
>{
>    v.execute(this);
>}

I'm afraid I really don't see a meaningful difference, in that case,
between calling mynode.accept(myvisitor)  and calling
myvisitor.execute(mynode) directly. A difference only arises when accept()
starts doing other things... and as I noted, the moment it does so you run
into compatability problems between your visitors and visitees, and I don't
see a way to define that cleanly at the API level.

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 21 March 2001 16:08:15 UTC