New EEP draft: Pinning operator ^ in patterns

Loïc Hoguin essen@REDACTED
Fri Jan 15 17:01:39 CET 2021


On 15/01/2021 16:35, Raimo Niskanen wrote:
> On Fri, Jan 15, 2021 at 04:22:55PM +0100, Nicolas Martyanoff wrote:
> :
>>
>> I believe this discussion is moot. We can spend hours arguing about CS theory,
>> but at the end of the day, the problem is about changing a fundamental aspect
>> of a language. And clearly quite a lot of developers, me included, are worried
>> about this kind of change.
> 
> 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?

Language features that require the compiler to remind you to use them 
are probably not worth having. This is at least how it feels for me.

That said, I think most of the opposition is about the pinning operator. 
There's a use case for having a tool of some kind that tells you when a 
variable is matched vs bound. Perhaps this belongs more to the realm of 
editors and syntax highlighting than it does the realm of languages and 
operators. There's no reason this can't be achieved on the editor's side 
of things, at least in the land of IDEs.

> 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 think most people just opposed 1) without considering 2) (because why 
would they?).

-- 
Loïc Hoguin
https://ninenines.eu


More information about the erlang-questions mailing list