[erlang-questions] Guards syntax for multiple values

José Valim jose.valim@REDACTED
Tue Mar 26 07:52:41 CET 2019

The concern I have with adding lists:member/2 and similar to guards is that
adds an exception to the language, since all guards today exist in the
"erlang" module. If lists:member/2 is allowed in guards, why not the other
functions in lists? There are also other implementation differences, such
as the fact guards are not traceable and all BIFs are.

That's not to say a new syntax is needed. For example, a new function could
be added to erlang such as lists_member or is_member. I believe those
reasons are what caused erlang:map_get/2 to be added instead of allowing
maps:get/2 in guards.

*José Valim*
Skype: jv.ptec
Founder and Director of R&D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190326/9c56a7aa/attachment.htm>

More information about the erlang-questions mailing list