I must disagree. With only three conditions, all of which have very small associated blocks, there's no reason not to use a simple if/else structure. A dispatch table is fine when there are, say, five or more conditions, IMHO. But any less, and you're adding an extra layer of complexity for no reason.