New EEP draft: Pinning operator ^ in patterns

Sean Hinde sean.hinde@REDACTED
Thu Jan 21 18:39:40 CET 2021

> On 20 Jan 2021, at 07:18, zxq9 <zxq9@REDACTED> wrote:
> "Will this make Erlang an easier to learn language?"
> Adding flippant idiosyncrasies never makes a language easier to learn. Removing shadowing in funs would, though.
> This is a *complication*, not a *simplification*.

This. Following along this discussion I find myself holding imaginary conversations with a new Erlang programmer.

These conversations all end up in the weeds of why a variable can / should sometimes be written with a caret. For me this solves a non problem for folks experienced in Erlang, and provides an extra hurdle to newcomers.

Lots of new corner cases in the learner world view to explain and understand and reason about.

(I speak as someone who has written more Elixir in the last few years than Erlang, and as someone who is currently teaching his son to program in Erlang).

I would support adding  a warning for those who see matching on bound variables as a source of errors and not an awesome feature.


More information about the erlang-questions mailing list