christopheradams/elixir_style_guide

Best practice: How and where to put protocols and their implementation?

Open

#84 opened on Apr 5, 2016

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Elixir (4,429 stars) (301 forks)batch import
discussionenhancementhelp wantedquestion

Description

I think it would help to have a common place to put protocol definitions and also implementations. It would be in particular interesting if protocols are implemented for existing modules.

For discussion:

definition:

file: lib/protocols/incredible.ex

implementation for a new modules within the module.

implementation for an existing module (e.g. Integer) in:

file: lib/protocols/impl/integer.ex

or

file: lib/protocols/integer_impl.ex

?

Contributor guide

Best practice: How and where to put protocols and their implementation? · christopheradams/elixir_style_guide#84 | Good First Issue