[erlang-questions] The If expression

Henning Diedrich <>
Thu Apr 22 01:10:14 CEST 2010


Did anything come from the discussion about the if expression ( 
http://www.erlang.org/pipermail/erlang-questions/2009-January/040808.html )?

I remember reading that one-branched ifs shouldn't be necessary. And 
that if they are needed it's a sign of bad structure / code in the first 
place. I'm a serial offender.

Is there a specific tip on how to think differently when one runs into 
frequently using one-armed ifs? I.e., writing a lot of true -> nil for 
the empty second branch?

Thanks!
Henning


More information about the erlang-questions mailing list