in reply to Avoiding if/else knots
The technique's perfectly valid and is usually known as a 'dispatch table' (if you're looking for a search term).