[erlang-bugs] Regression on match in 17.0-rc1

Anthony Ramine <>
Tue Feb 4 14:52:49 CET 2014


You fixed it already? Cool.

Regarding cerl_clauses:match_list, I don’t see the point of making it return clearly wrong or misleading values.

Why would it return [{X,io:format…},{Y,io:format…}] in the first place? That result is all but useful. Making it return a list of aliases would reduce the work needed in callers, don’t you think?

-- 
Anthony Ramine

Le 4 févr. 2014 à 13:42, Björn Gustavsson <> a écrit :

> (I am CC:ing Richard Carlsson since he wrote the cerl modules and the inliner.)
> 
> On Tue, Feb 4, 2014 at 11:17 AM, Anthony Ramine <> wrote:
>> Hello Björn,
>> 
>> I am wary of the call to cerl_clauses:match_list in cerl_inline, given that the returned bindings appear to be used.
>> 
> 
> The important thing is the expressions passed to cerl_clauses:match_list/2. If
> the inliner make sure hoisting any expression with a side-effect to an enclosing
> 'let' as I did in my fix it will still be safe.
> 
>> What do you think of making cerl_clauses:match_list returns {boolean(),Bindings,Aliases}?
> 
> Perhaps. If there is a clear need for it.
> 
> /Bjorn
> 
> -- 
> Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-bugs mailing list