But what is now, given that compilers can optimize stuff like this and tell
the processor to calculate all 3 branches simultaneously, which is not
possible for ifelse.
Which one would you choose?
Equally important, which one do you think is more readable? I would say if
else is hard to read, but this can be just personal impression.
1. Simultaneous execution of sequential IF blocks is not necessarily a
good idea, as it could change the meaning of the code.
2. If you're using more than two mutually exclusive alternatives, then
why are you using IF at all, unless you're working in a language that
doesn't have any form of CASE construct? (Nearly everything based on C
or ALGOL syntax has some form of it, and even primitive BASIC has
ON...GOTO, or occasionally GOTO...ON, and even the most primitive
versions of RPG I've worked with -- hardly a modern language -- have
SELECT...WHEN...OTHER blocks).
--
JHHL
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org