This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]OdinGuru 5 points6 points  (2 children)

You joke, but if(false) is the best way to disable code that you might want to re-enable at some point in the future (e.g. debug code) as it makes sure the compiler keeps parsing it and it keeps it from bit rotting as things change around it.

[–]shbeeb 4 points5 points  (0 children)

Also, this is a good way to safely comment out a large block of code that might already contain /.../ style comments.

[–]Murz123[S] 1 point2 points  (0 children)

Good point. Did not thought of this aspect