New EEP draft: Pinning operator ^ in patterns
Fri Jan 15 17:20:23 CET 2021
Pinning would make use of already bound values a lot more explicit - how
would this not make the language better? This isn't just a thoughtless copy
of an Elixir feature. This is something that addresses a
real shortcoming/complication/source of bugs in the erlang language and it
just happens to borrow the syntax from a feature in Elixir. I too prefer
languages to be conservative and not just absorb features from any other
languages that happen to be popular but this isn't that. If the compiler
can tell me I may not have done something I intended then I want it to if
at all possible.
On Fri, 15 Jan 2021 at 16:01, Loïc Hoguin <essen@REDACTED> wrote:
> 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
> >> but at the end of the day, the problem is about changing a fundamental
> >> of a language. And clearly quite a lot of developers, me included, are
> >> about this kind of change.
> > And I want to get clarity about exactly why so many developers are
> > about this particular proposed change, and therefore try to look
> > 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
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions