I wouldn't lump guards and typespecs together. Guards are a runtime feature of erlang/elixir's excellent pattern matching.
Typespec is an opt-in type hint for develop and build time.
Typespec is an opt-in type hint for develop and build time.
I find them much better suited for specific tasks where there is little overlap or repetition.