Why do some people shun `if`?

Michael P. empro2@REDACTED
Wed Aug 18 21:10:37 CEST 2021


> 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"






More information about the erlang-questions mailing list