christopheradams / christopheradams/elixir_style_guide
Best practice: How and where to put protocols and their implementation?
- Dominant language
- Elixir
- Stars
- 4.4k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
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
Research direction
Start by reading the discussion on this issue and compare the proposed paths, including lib/protocols/incredible.ex, lib/protocols/impl/integer.ex, and lib/protocols/integer_impl.ex. The work is complete only when the project agrees on a convention for protocol definitions and implementations and records it in the style guide.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100