> basically a way to simulate multiple dispatch

I mean not multiple dispach, but _rewrite_ part of RelShuttle.
RelShuttle allows to rewrite the tree while walking.
It looks like current RelDecorrelator code tries hard to map old to
rewritten relations in the HashMap, while more natural "rewrite all
children and combine the results" might be more natural, and safer
(you won't forget to lookup old-to-new-rel-map).

> doesn't handle addition of new sub-types

I do not think ReflectiveVisitor solves this in a good way.
1) If new sub-type is added, you have no idea where it should dispatch
to. I mean, if someone adds custom relation sub-type, it can't plug it
into RelDecorrelator.
Do you mean you plan to teach ReflectiveVisitor to "lookup methods in
plugged in classes fist"?

2) ReflectiveVisitor makes code much harder to analyze. "find usages"
in IDE does not work. IDE cannot see the call site through the
reflective calls.

Vladimir

Reply via email to