<div><div dir="auto">You’re probably new to Erlang.</div></div><div dir="auto"><br></div><div dir="auto">You can achieve the same with parse_transform:</div><div dir="auto"><div><a href="https://github.com/mad-cocktail/gin/blob/master/README.rst">https://github.com/mad-cocktail/gin/blob/master/README.rst</a></div></div><div dir="auto"><br></div><div dir="auto">There’s no point to add new syntax to the language. </div><div dir="auto">/Frank</div><div dir="auto"><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everybody,<br>
<br>
I'm not very experimented in Erlang but I read carefully books and<br>
official documention.<br>
<br>
It seems to me that the guards syntax is not as good as it should be,<br>
i.e. too much verbose for multiple values.<br>
<br>
do(val1) -> val1;<br>
do(val2) -> val2;<br>
do(val3) -> val3;<br>
do(val4) -> val4;<br>
do(val5) -> val5.<br>
<br>
do(Val) when Val =:= val1; Val =:= val2; Val =:= val3; Val =:= val4;<br>
Val =:= val5 -> Val.<br>
<br>
It's boring and error prone to write.<br>
<br>
Has a "in tuple" syntax already be considered ? Something like :<br>
<br>
do(Val) when Val in {val1, val2, val3, val4, val5} -> Val.<br>
<br>
Cheers<br>
<br>
Florent<br>
<br>
-- <br>
FLOSS Engineer & Lawyer<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div></div>