New EEP draft: Pinning operator ^ in patterns
Tue Jan 19 18:15:44 CET 2021
On Tue, Jan 19, 2021 at 03:39:35PM -0000, Wojtek Surowka wrote:
> >I am sorry, I was in a bad mood and interpreted your "that the proposed
> change is not backward compatible" as you had not read the EEP since it
> states up front under "Backwards Compatibility" that "This change is
> therefore fully backwards compatible".
> >> backward incompatibility? Yes or no?
> > It should be obvious to anyone that has read this thread that that
> question can not be answered with a simple yes or no.
> This is true and sorry for asking it in such a way. Erlang is by far my
> favourite platform and environment and its simplicity is huge part of its
> appeal so when in my mind this simplicity is in danger I can overreact.
> Anyway I agree that the proposal, even when extended in future in line with
> further discussion here will not introduce a compatibility problem. The only
> problem I see in the proposal is that it is against the extreme simplicity
> of Erlang language. But this problem is significant to me and because of if
> I would prefer it the proposal is not implemented. I'll live if it is, but I
> think Erlang would be a worse language with pinning than it is without it.
I am sorry that the argumentation got a bit harsh from me too.
It is interesting to see that this suggestion brings out so strong
opinions. Actually very good that people care!
I agree about the beauty of Erlang's simplicity. For this particular
suggestion I, personally, feel that because Erlang "hides" if a variable
occurence is a binding or a matching in the knowledge if the variable has
occured before or not, it may be too simple because it is slightly ambigous.
Therefore I think that although annotating matches would make the language
less simple it would improve clarity by making intention explicit.
I can live without this, have so for the last 20 years, but I think Erlang
would be a slightly better language with pinning than it is without it.
> Wojtek Surowka
And, as others have pointed out. We need to know the direction; is this
where are we heading towards? I think that this change in itself just may
be worth its own weight, but possible future changes are more interesting.
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions