New EEP draft: Pinning operator ^ in patterns

Mon Jan 18 14:49:12 CET 2021

On Fri, 15 Jan 2021 13:34:18 +0100
Richard Carlsson <carlsson.richard@REDACTED> wrote:

> Imagine a world where Erlang had not allowed already-bound variables in
> patterns (forcing you to use the idiom "X1 when X1 =:= X -> ...", as in
> e.g. Haskell),

This deserves being highlighted lest it get lost for future application:

    Look at a proposed solution from before the problem was introduced.

I hope that I have applied this approach before, but if so I have never generalised it. Now I will store it in my mental toolbox. :-)



Reasonable is that which cannot be criticised reasonably anymore.

More information about the erlang-questions mailing list