This is not an immediate goal but we may add some guards based on types in the future.
This doesn’t work because types are more expressive than guards. So associating the two will generate impedance because you will either have weak types (limited to guards semantics) or you will have fake guards (which says something is a list of structs but it is incapable of checking if they are indeed the same).
Also, I think the duplication is obvious (and annoying) only on extremely short functions as above. In the majority of functions, I doubt they would feel redundant. It is too early and we have too few examples to start optimizing for “duplication”.
Furthermore, Elixir already allows pattern matching, guards, and default arguments in function signatures. Adding more complexity to it is the wrong way to go imo. ![]()


















