Why type-check functions do not end with a question mark?

Why aren’t type-check functions like is_atom or is_integer followed by a question mark, (is_atom? or is_integer?) since they return either true or false (like Enum.member?)?

Is there any specific reason as to why?

The convention is that is_ prefixed functions can be used in guards, while ? suffixed can’t.

5 Likes

also see https://github.com/elixir-lang/elixir/issues/271

3 Likes