Re: Why do some people shun `if`?

zxq9 <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
On 2021/08/15 22:15, Jesper Louis Andersen wrote:
> There are uses for the if...end construct in Erlang. The reason you 
> often shun it is because it occurs quite rarely in a language where you 
> have a proper case...end matching construct. So to avoid newcomers to 
> fall into a trap of using if all the time, you write it down in the 
> style guide.
This sentence, generalized, should be in ever style guide for every 
language -- and not just for `if` vs proper `case`.

I don't have time to expand on the intuition this triggered, but it is a 
really great expression. Thanks, Jesper!

-Craig
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.