[erlang-questions] Guards syntax for multiple values
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.
Founder and Director of R&D
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions