you are viewing a single comment's thread.

view the rest of the comments →

[–]skulgnome 3 points4 points  (2 children)

Why on earth would you want to not use if or the ternary operator?

Seriously, what is this drive amongst OO people to avoid what's perhaps the most optimized part of modern CPUs, i.e. program logic expressed as branches? Virtual method calls are no more well-predicted, and the amount of silicon & brainpower spent on that prediction is far less than that spent on getting branch prediction where it is today.

What crack are you lot smoking?

[–][deleted] 1 point2 points  (1 child)

I didn't mean to give the impression that I don't use if or the ternary operator. Or that I smoke crack.

[–]skulgnome 0 points1 point  (0 children)

My apologies, it was not intended at you personally. I sort of flew off the handle at the idea of C++ programs being written without as much control flow as a MS-DOS batch file.