Re: New EEP draft: Pinning operator ^ in patterns

zxq9 <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Or just don't and leave "well enough" alone.

"No" is an acceptable answer.

-Craig

On 2021/01/20 12:10, Bach Le wrote:
> I rarely post but this change seems strange.
> 
> The rule for Erlang has always been single assignment so I don't think 
> pinning is necessary.
> What if we reverse the operator and call it the "rebind" operator?
> Similar to how Elixir has to explicitly pin, Erlang has to explicitly 
> rebind.
> Borrow the "spirit" and not the exact thing.
> Let's call it "&" to avoid confusion.
> 
> Say in a case expression and you want to introduce a new variable, 
> ignoring whatever that has appeared before, use:
> 
> case thing() of
>      {ok, &T} -> T
> end
> 
> No new error or warning introduced
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.