Guards! Guards! the What, How and Why
Guard conditions are one of Elixir (and Erlang)'s fundamental constructs. In this talk we take a '6 levels of difficulty' approach, explaining:
- what guards are, exactly.
- the differences between `cond`, `case` and `with`
- how guard conditions differ from similar constructs in other languages.
- building your own guards using `defguard`
- how to write 'guard-aware' macros.
- how to go completely overboard in writing guard-safe code (and why you should not do so ;-) )