Re: Why do some people shun `if`?

"Michael P." <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <20210818211037.6efa584d@aesop>
> On Sun, Aug 15, 2021 at 6:48 AM zxq9 <zxq9@REDACTED> wrote:
> > You can still always do the same thing with a `case` using guards,
> > though -- and as you mentioned you *could* do the same with funs, but
> > that's a bit crazy as you're invoking the lambda machinery

Have just stumbled across this
(looking for s/th else, but remembered):

"The difference between function calls and `case ... of`
are very minimal: in fact, they are represented the same way
at a lower level, and using one or the other effectively
has the same cost in terms of performance."

    -- https://learnyousomeerlang.com/syntax-in-functions#in-case-of

[Reply is a bit constructed, original msg deleted,
no msg id from the archive and no clue how to put it in even if]

~M

--

  |-_|-_|-_-|            (o_o)_o)_o)_o)_o)_o)_o)_o)_o)_o)_o)_o)_o)_o)

 "We're concerned / You're a threat / You're not integral to the project"
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.