Why is the 'if' statement considered evil?

Posted by Vadim on Stack Overflow See other posts from Stack Overflow or by Vadim
Published on 2009-10-12T12:03:55Z Indexed on 2012/06/25 15:16 UTC
Read the original article Hit count: 280

I just came from Simple Design and Testing Conference. In one of the session we were talking about evil keywords in programming languages. Corey Haines, who proposed the subject, was convinced that if statement is absolute evil. His alternative was to create functions with predicates. Can you please explain to me why if is evil.

I understand that you can write very ugly code abusing if. But I don't believe that it's that bad.

© Stack Overflow or respective owner

Related posts about programming-languages

Related posts about if-statement