Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: using switch

by thundergnat (Deacon)
on Sep 29, 2005 at 13:29 UTC ( #496095=note: print w/ replies, xml ) Need Help??

in reply to using switch

Your best bet is to avoid using Switch at all, especially in production code. It is very easy to introduce very hard to trace bugs and is just too fragile.

If you have a large number of possible branches use a dispatch table, otherwise, if-then-else (or ? : ).

Comment on Re: using switch

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496095]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-05-04 18:49 GMT
Find Nodes?
    Voting Booth?

    In my home, the TV remote control is ...

    Results (96 votes), past polls