top | item 40530774

(no title)

manusachi | 1 year ago

I guess it has something to do with those functions frequently used in guards. _Notice tuple_size/1, map_size/1, byte_size/1 and some other functions/macros are defined in Kernel and documented in the section Guards[0]_

We can't invoke remote functions (which Tuple.size/1 would have been) in guards.

Though, there are some other functions that I can't think of a reason why they are "orphaned" such as put_elem/3 to put element into a tuple, while, for example, for maps there is Map.put/3

[0] - https://hexdocs.pm/elixir/Kernel.html#guards

discuss

order

No comments yet.