<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<br><br><div>I use the rebind[1] transform for create Hygienic macro.</div><div>[1]: <a href="https://github.com/camshaft/rebind">https://github.com/camshaft/rebind</a><br></div><div><br></div><div> such as:</div><div><br></div>-define(CASE(Expr, A, B),<br>        try Expr of<br>          {ok, rebind(Result)} -> A;<br>          {error, rebind(Err)} -> B<br>        catch<br>          throw: {ok, rebind(Result)} -> A;<br>                 {error, rebind(Err)} -> B<br>        end).<br></div><div dir="ltr"><br></div><div>then I can use ?CASE in A or B, each time macro expanded, the Result and Err will have a new name such as _Result_REBIND_1_, etc.</div><div><br></div><div>But this can not work on Erlang 21, because function call are not allowed in pattern with the new AST.  How can I get over it? Or are there any other way to implement the hygienic macro?<br></div><div dir="ltr"><br>-- <br>regards,<br>Xavier Wang.</div></div></div></div>