christopheradams/elixir_style_guide

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

オープン

#84 opened on 2016/04/05

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)Elixir (300 件のフォーク)batch import
discussionenhancementhelp wantedquestion

Repository metrics

Stars
 (4,429 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

?

コントリビューターガイド