New EEP draft: Pinning operator ^ in patterns

Loïc Hoguin essen@REDACTED
Mon Jan 18 11:36:03 CET 2021

On 18/01/2021 10:47, Raimo Niskanen wrote:
> On Sat, Jan 16, 2021 at 02:32:21AM +0900, zxq9 wrote:
>> On 2021/01/16 0:35, Raimo Niskanen wrote:
>>> 1) Would the language be a better language with a mandatory pinning operator?
>> At the cost of *adding* something arbitrarily hard to research[1] syntax
> There, again!.
> Someone sidetracked right off into "it is bad to add this feature".

I do not understand what you are trying to say. In my mind, if someone 
thinks a feature is bad, then it doesn't make the language better for 
them, and even less so if it's mandatory.

It would also be very difficult to objectively say it's an improvement 
or not, because measuring the benefits in this case is not trivial as 
I've previously stated. So you're only going to get subjective opinions.

Personally I'm all for the optional warning (current version of the 
warning), I'm OK with the operator if it was added along with proper 
local scoping but would likely not use it outside of that scenario (in 
my projects), and as such I would be very unhappy if the operator was 

Being able to write "A = 5, A = inc(4)." is what makes the Erlang 
language the best I've used in my opinion.

So for the "mandatory" part I would say the language would become worse. 
If optional, the language would become better but only if added along 
with local scoping (or with a clear plan leading to local scoping, 
doesn't have to be done all at once), otherwise it's not an improvement 
in my opinion.


Loïc Hoguin

More information about the erlang-questions mailing list