dwyl / dwyl/learn-elixir

Elixir Behaviour vs Protocol

Open
#113 0 comments 2 reactions 0 assignees View on GitHub
question
Dominant language
Elixir
Stars
1.7k
Forks
112
PR merge metrics
No merged PRs in 30d

Description

What are the differences between [behaviours](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html#behaviours) and [protocols](https://elixir-lang.org/getting-started/protocols.html)

An example of behaviour are adapters: https://hexdocs.pm/ecto/2.2.8/Ecto.Adapter.html#content
![image](https://user-images.githubusercontent.com/6057298/52580754-e6f29700-2e20-11e9-8f6d-842891d2d83d.png)

And an example of a protocol is https://hexdocs.pm/ecto/Ecto.Queryable.html
![image](https://user-images.githubusercontent.com/6057298/52580846-1dc8ad00-2e21-11e9-80ac-9c70ea09ab53.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.