New EEP draft: Pinning operator ^ in patterns

Nicolas Martyanoff khaelin@REDACTED
Fri Jan 15 16:26:07 CET 2021

On 2021-01-15 16:14, Raimo Niskanen wrote:
> Joe wrote: "one way unification (from Prolog)"
> I read this as either "[one way unification] (from prolog)" or
> "one way [unification (from prolog)]" and think it is the latter.
> StackOverflow has a thread about Pattern Matching vs. Unification:
> Would you agree that Erlang's "unification" is asymmetrical since the first
> occurence of a variable always succeeds for a new variable (binding), and
> that all following occurences must have the same value (matching) or else
> there is a badmatch runtime exception?

I believe this discussion is moot. We can spend hours arguing about CS theory,
but at the end of the day, the problem is about changing a fundamental aspect
of a language. And clearly quite a lot of developers, me included, are worried
about this kind of change.

Nicolas Martyanoff

More information about the erlang-questions mailing list