News for hackers. Stuff that matters.
Re:The death of if/else cascades, a lightweight alternative by clistctrl on Monday December 07, 2009 @09:23AM (#981193)
So this strikes me as a fairly common problem. If I was going to solve it I don't think i would use a "dispatch table" I wold prefer to use polymorphism. In C# maybe i would have an interface with the common method. An abstract class to provide a default implementation. Then several classes which either implement the interface directory, or inherit the abstract class.

There are no comments on this comment yet.