Re: Why do some people shun `if`?

Vance Shipley <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAMoa0N+=SiPBSWpTpWb55ay=MeyrFeUBJUAc7C0j73+7DRcMEg@mail.gmail.com>
Why I find 'if' awkward is that when I test a condition for the success
path and have a fall through clause for the fail path the semantics don't
match with 'true'.

        if
             Foo == 42 ->
                  ok;
             true ->
                  {error, Foo}
        end.

-- 
     -Vance
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.