3 ms·
> @spec line in Elixir is just not DRY and inconvenient. This. So many times this. If specs could be inlined it would be so much less hassle (but might hurt re
by dmitriid 4y ago
> @spec line in Elixir is just not DRY and inconvenient.
This. So many times this. If specs could be inlined it would be so much less hassle (but might hurt readability because of pattern matching)
- throwawaymaths 4y agoYou can use @spec as a public API declaration at the top of the module by bunching them together away from the functions themselves.
- dmitriid 4y agoI prefer to have my specs as close to the function as possible :)
- throwawaymaths 4y agoOpen your mind.