Although the mystical land of functional programming preaches separation of data and behavior, keeping everything explicit, there are cases when coupling those (or dispatching based on type) are useful. This talks is about when, how and why to couple data and behavior, showcasing real code where Elixir Protocols are used to simplify and abstract common logic of different data types.
Objectives:
Showcase benefits and methods for coupling data and behavior (with Elixir in mind):
Standardize things such as:
Indexing data - access grant
Printing and serialization
Protocols in Elixir (inspired by Clojure)
Protocols vs Behaviors
Good practices when using Protocols
Visit website for slides and more details: [ Ссылка ]
![](https://i.ytimg.com/vi/fnfcYKq373w/maxresdefault.jpg)