Re: New EEP draft: Pinning operator ^ in patterns
Richard Carlsson <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CANKG3zm8sJNHWi0CkoAMNQm8Db=inAzpcmn=BDiqd5ygiDGOjA@mail.gmail.com> |
Den fre 22 jan. 2021 kl 16:42 skrev Sean Hinde <[email protected]>: > I just looked through my Elixir codebase - There are zero occurrences of > matching on bound variables in normal code. There are a *lot* of carets, > but all are used in the ecto DSL where it is required to pass in a > parameter to a query. > > But I use this feature in my Erlang code all the time. > > Why the difference? I honestly don't know. I guess it doesn't feel > idiomatic in a language where matching a bound variable requires a caret > and there are other ways to express the same thing. > Could you give some examples of what those other ways are? It could be interesting to compare. /Richard