|P is for Practical|
Defense of nested ifsby drinkd (Pilgrim)
|on Jan 04, 2002 at 21:27 UTC||Need Help??|
While nested if statements look a mess, the unfortunate truth is that this is really the way decisions are made by humans.
If my car starts, I'll go to work, If net nets up, I'll check email and read PM, If there's a good thread, I'll read it, etc. . . . ..
The problem with a one-dimensional dispatch table, is that the operations in the outermost nests need to be replicated into much of the table entries, which require programatically building complicated hashes, futhur sacraficing readability.
I'm not sure how to build a "multi-dimensional" dispatch table where say the "rows" have one set of functions and the "columns" have another, without programatically building the subroutines.