New EEP draft: Pinning operator ^ in patterns

Richard Carlsson carlsson.richard@REDACTED
Fri Jan 22 09:54:05 CET 2021

Den fre 22 jan. 2021 kl 06:56 skrev Nicolas Martyanoff <khaelin@REDACTED>:

> On 2021-01-21 20:55, Richard Carlsson wrote:
> > As you yourself note, the warning is likely to eventually be made the
> > default (if generally accepted)
> A warning is not a feature of the language and has no reason to be made
> mandatory beyond annoying developers of existing codebases for the heck of
> it.
> And as Essen noted, warnings can be manually disabled. If this operator was
> made mandatory, it could not be disabled unless someone forks Erlang.

I said "made the default", meaning that you could still disable it - and
that would have to be the case for many years, just like you can still
disable the warnings for obsolete guard tests to compile quite old code.
Only if it was made an error (in a distant future, as I said elsewhere)
could you not disable it.

> At this point it is clear that you have no interest in compromising

There are only 4 real alternatives here. The first two are either 1) the
EEP as it is, or 2) forgetting about it completely. The other two are to
add just the warning for already-used variables and skip the ^-annotation
part, either 3) intending to keep the warning optional for the forseeable
future, or 4) with the intent to enable the warning by default within a
couple of years. As I have said already, these latter two are my second
best choice, so what more can I compromise on? I can still argue that I
think that in the long run, ^-annotations have more benefits, but I don't
have any way to make this happen apart from by trying to make a convincing
case for it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list