New EEP draft: Pinning operator ^ in patterns

Raimo Niskanen raimo+erlang-questions@REDACTED
Wed Jan 20 15:03:08 CET 2021


On Wed, Jan 20, 2021 at 03:18:24PM +0900, zxq9 wrote:
:
> > There has been concern on the list that this discussion has not remained
> > technical and on point to the value of the EEP, and I would suggest the fault
> > lies in the tool being used to elicit feedback (e-mail). That concern would be
> > addressed by allowing people to comment line by line on the EEP and discuss
> > the specific points of the EEP in the PR itself. And we can avoid blame being
> > thrown around about people having or not having read the EEP.
> 
> I get the feeling that someone already has a plan and they are just 
> going to shove it through ...

It is unfortunate that you have gotten that feeling.

We at the Erlang/OTP group try to evaluate an EEP based on its pros and
cons for the language and the community.  Getting solid arguments both for
and against would help in that decision.


: [aggrevated rant snipped]
> 
> One of the more annoying things about the proposal is that it is 
> impossible to actually search for if you don't already know what it is 
> called, and if you do you don't need to search for it. The term "pinning 
> operator" is certainly not what would come to mind since it doesn't mean 
> anything that the semantics of the term hint at, and the idea that "Oh, 
> I can rebind or annotatively alias stuff in Erlang, a language 
> absolutely famous for having single-binding?" is rather alien and should 

I think it is incorrect to talk about rebinding and aliasing, and to
suggest that single binding is compromized here.

> remain so.
> 
> It literally isn't even an operator.

This and the name 'pinning operator' was addressed by Richard in his reply
to O'Keefe's post where he (the latter) pointed that out.  If you have more
about that point please post to that sub-thread.

> Literally.
> I literally can't even. (Am I doing 2021 right?)

You lost me there.  I am probably too old or not anglosaxian enough.

> 
> A second somewhat silly thing about this is the attitude of "Oh, well, 
> fortunately in Erlang the '^' character was free to use so we'll just 
> use it!" without considering that this will also remove it from the list 
> of available characters for at least a decade even if you added it in 
> the next release and removed it immediately afterward. This character 
> actually *is* used as an operator in many languages and notations for 
> exponentiation.

That the character can be used may be said in different ways, which does
not alter the fact that the character can be used.

That the character may have better uses is a valid point.  I think that
reserving it for exponentiation is a waste, though, since that can be done
with introducing an arity 2 function instead.

> 
> "Will this make Erlang a better language?"
> No. It will make it harder to understand because people will be 
> surprised when they see what looks like a random typo in the code 
> because this silly convention has so few use cases.

An education problem.  Should be solvable.

> 
> "Will this make Erlang an easier to learn language?"
> Adding flippant idiosyncrasies never makes a language easier to learn. 

Who can argue against that.

The discussion should be about _if_ this is an unserious oddity or a
practical semantics clarification.

> Removing shadowing in funs would, though.

Probably.  It should be discussed about exactly how that could be
accomplished.

> This is a *complication*, not a *simplification*.

Then I can claim that this is a *clarification*, not a *simplification*.

> 
> -Craig

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list