in reply to Nested Dispatch Tables?

If you are doing OO programming, the need for dispatch tables outside a class should not arise. Or, rather, if it does arise, the decision should be delegated to the appropriate (sub)class, and have only one dimension.

To my mind, if requirements appear more convoluted than that, the objects have not been sufficiently decomposed. In particular, when you appear to need to dispatch by TYPE - that decision clearly should already have been done based on the class of the object you are addressing.

Perhaps, if you gave us some information about the problem domain (preferably code or pseudo-code), this discussion would not appear to be so abstract.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

Replies are listed 'Best First'.
Re^2: Nested Dispatch Tables?
by Spidy (Chaplain) on Mar 24, 2008 at 16:28 UTC

    I'm not doing any OO programming for this project - sorry if anything I said made you think that.