On Saturday, 3 August 2013 at 18:56:47 UTC, JS wrote:
Um, it can actually save a lot of type and errors.

having two places to change is very error prone.

if (cond) { }
switch(cond)

What is error-prone is evaluation of a complex condition twice assuming it will result in the same value. That's also a common error with C macros. You should save the value in a variable:

auto cond = complexCond;
if (cond) { }
switch(cond)...

Reply via email to