New EEP draft: Pinning operator ^ in patterns

Raimo Niskanen raimo+erlang-questions@REDACTED
Mon Jan 18 10:36:25 CET 2021

On Fri, Jan 15, 2021 at 04:51:09PM +0100, Nicolas Martyanoff wrote:
> On 2021-01-15 16:35, Raimo Niskanen wrote:
> > And I want to get clarity about exactly why so many developers are worried
> > about this particular proposed change, and therefore try to look thoroughly
> > at the arguments.
> > 
> > It is as you say a fundamental detail in the language.
> > 
> > 1) Would the language be a better language with a mandatory pinning operator?
> > 
> > 2) If so is there a migration path worth the trouble?
> > 
> > So far I think the discussion has been centered around 2),
> > before talking about 1).
> I believe that lots of developers, me included, have been clear about 1: the
> language would be more complicated, for something cryptic that does not really
> bring anything to the table.
> -- 
> Nicolas Martyanoff
> khaelin@REDACTED

I see that many on this list are clear about not liking the suggestion to
add this feature.

Many are against having an optional annotation because there should not be
more than one way to do it, instead of discussing a language with
a mandatory annotation of matching.

Many voice the feeling that it is cryptic and does not bring anything to
the table.  Some compare with other languages using badly matching (pun
intended) arguments such as comparing with Prolog's unification.

Many are against introducing this feature because of what it would do to
existing code, which is about 2)

So, no, I do not agree that this discussion is focused around 1)

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list