|
-
October 14th, 2004, 06:35 PM
#8
Erm, I don't believe it has much to do with performance.
Less people use it due to readability and maintenance issues. The tertiary operator is generally seen as a bit more obtuse than the simple if statement. Your own if statement wouldn't be quite as bad if there was better formatting of the code.
In the end the compiler will generate the same code either way, optimized as far as you tell it to.
Also, this doesn't really belong in code review. This would fit far better in the noob programming forum.
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|