MUMPS. There are lots of WTF features, I've picked one, the if statement. (Note that I'm using a rather verbose coding style below in order to accomodate those who don't know the language; real MUMPS code is usually more inscrutable to the uninitiated.)

if x>10 do myTag(x) ; in MUMPS "tag" means procedure/function else do otherTag(x)

This is similar to saying in Java:

if (x > 10) { myMethod(x); } else { otherMethod(x); }

Except that in MUMPS, the else statement isn't syntactically part of the if block, it is a separate statement that works by examining the built-in variable $TEST . Every time you execute an if statement it sets $TEST to the result of the if statement. The else statement actually means "execute the rest of line if $TEST is false, otherwise skip to the next line".

This means that if x was greater than 10 and thus the first line called myTag , and myTag contains if statements, then the behavior of the else depends not on the if in the line above it but on the last if evaluated inside of myTag ! Because of this "feature", MUMPS coders are generally taught write the above code like this to be safe:

if x>10 do myTag(x) if 1 else do otherTag(x)