Is there a book or online resource which assumes knowledge of the info in the guide, and shows how these come together in production code? I.e., when do working programmers use these specification features?
I’m learning Elixir, and I might not understand this, but it feels like there are three different DSLs (mini languages) for types. TBH, this is the only aspect of Elixir that I find a little less than optimum. That is, three separate systems to learn which are somewhat equivalent. So e.g., it seems we have:
- The type specs
- The set of allowed expressions in guards, and
- Other language-level features like validations and @enforce_keys.
So I’d like to learn the coding conventions. Do Elixir programmers make use of all of these whenever possible? E.g., for every function parameter, its type is specified both as a type spec and (if possible) as a guard expression? Makes me wonder if guard expressions could be automatically generated from type specs.

























