in reply to A short, "iffy" rant
Point here is if has VALUE ... dispatch tables are an awesome trick, and I'm glad you have discovered them, but sometimes the blocks of code are incredibly unlike, or the tests don't (yes really) map down to scalars.
What you should have said was "sometimes dispatch tables are better than if", not "friends don't let friends use if". That, my friend, is the "if something is good, more of something must be better" fallacy. Much like what happened to the XP crowd... Dispatch tables and FP are good. Nested ifs can usually be a sign problem, but mapping ifs to hashes just makes hashes of virtual ifs...
Anyhow, closures rock. Use them. In many cases, not using an if is a gateway to a higher plane of existance (as is passing functions around), but don't be afraid of if.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A short, "iffy" rant
by Ovid (Cardinal) on Oct 12, 2004 at 18:20 UTC | |
by SpanishInquisition (Pilgrim) on Oct 12, 2004 at 18:40 UTC | |
by dragonchild (Archbishop) on Oct 12, 2004 at 19:09 UTC | |
| |
by Ovid (Cardinal) on Oct 12, 2004 at 19:54 UTC |