Possible to avoid downcasting?

JN 666total at wp.pl
Tue Dec 24 20:06:03 UTC 2019


On Tuesday, 24 December 2019 at 19:52:44 UTC, H. S. Teoh wrote:
> So far so good.  But now I want to iterate over the trees, and 
> I'd like to be able to use information in the Derived node 
> directly.

How about using a visitor pattern to iterate over the nodes? 
That's how I'd solve it in a OOP context.


More information about the Digitalmars-d mailing list