<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="22432" data-post-id="22432">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I believe you reached the conclusion the use of <code>@impl true</code> is not worth for you (which is fine). <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>Misuse and overuse is going to happen pretty much with any feature. For example, the exact same could have been argued about the Registry.</p>
<p>Some extra comments:</p>
<aside class="quote no-group" data-username="eproxus" data-post="13" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eproxus/48/3497_2.png" class="avatar"> eproxus:</div>
<blockquote>
<p>It also separates the behaviour inclusion into different parts in the module.</p>
</blockquote>
</aside>
<p>I am not sure I follow. The point is exactly to associate the usage of the behaviour with its implementation. The only way to keep it together would be with something like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">impl MyBehaviour do
  def bar, do: :ok
  ...
end
</code></pre>
<p>but I believe the above looks… too foreign?</p>
<aside class="quote no-group" data-username="eproxus" data-post="13" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eproxus/48/3497_2.png" class="avatar"> eproxus:</div>
<blockquote>
<p>Denoting which behaviour the implementation is for (one can mix several behaviour implementations in the same module)</p>
</blockquote>
</aside>
<p>This should be fine because you cannot have duplicated callbacks. Plus the majority of times you are implementing only a single behaviour, so <code>@impl true</code> is less noisy than repeating <code>@impl Foo.Bar.Baz</code> multiple times. For cases you are using multiple behaviours, you can do <code>@impl Foo.Bar.Baz</code> and <code>@impl A.B.C</code>.</p>
<aside class="quote no-group" data-username="eproxus" data-post="13" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eproxus/48/3497_2.png" class="avatar"> eproxus:</div>
<blockquote>
<p>It can be forgotten</p>
</blockquote>
</aside>
<p>Unfortunately we cannot make it required because that would emit too many warnings. However, we can guarantee that, if you have used <code>@impl true</code> once in a module, you have to use it for all callback implementations.</p>
<aside class="quote no-group" data-username="eproxus" data-post="13" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eproxus/48/3497_2.png" class="avatar"> eproxus:</div>
<blockquote>
<p>It just gives some feedback when used with a callback implementation with the same name but different arity, and that’s it.</p>
</blockquote>
</aside>
<p>As mentioned in the proposal, it also gives valuable feedback to anyone who is reading the code, especially if the purpose of some particular function is unclear. We can all identify <code>handle_call/3</code> but how many Phoenix developers would know that an <code>action/3</code> in a controller is a Phoenix.Controller callback?</p>
<p>Thanks for the feedback!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22432" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-22432" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22432"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="22434" data-post-id="22434">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> and <a class="mention" href="/u/eproxus" rel="nofollow">@eproxus</a>: So how about a shortcut that can emit more warnings and could be much more cleaner?<br>
Simple example:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyProject.MyModule do
  impl_behavior MyProject.MyFirstBehavior do
    def first_behavior_method(), do: false
  end

  # ...
end
</code></pre>
<p>and this could be interpreted as:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyProject.MyModuledo
  use MyProject.MyFirstBehavior

  @impl MyProject.MyFirstBehavior
  def first_behavior_method(), do: false

  # ...
end
</code></pre>
<p>In that way we can find forgotten methods, because our implementation is “grouped”, but it’s interpreted still in same module and we do not need repeat any <code>@impl</code>, because shortcut like that could do this automatically.<br>
What do you think about it? Am I forgot about something?</p>
<p><strong>Edit</strong>: corrected name, thanks</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22434" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-22434" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22434"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="22435" data-post-id="22435">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bobbypriambodo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bobbypriambodo/120/2843_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bobbypriambodo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="14" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>but how many Phoenix developers would know that an action/3 in a controller is a Phoenix.Controller callback?</p>
</blockquote>
</aside>
<p>Ah, TIL <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22435" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-22435" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22435"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="22436" data-post-id="22436">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Eiji" data-post="15" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> and <a class="mention" href="/u/eproxus" rel="nofollow">@eproxus</a>: So how about a shortcut that can emit more warnings and could be much more cleaner?</p>
</blockquote>
</aside>
<p>To be clear, that’s what I tried to proposed above. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Except I used <code>impl</code> instead of <code>override_behaviour</code>. “overriding” a behaviour doesn’t make much sense, you don’t override it, you implement it.</p>
<p>I believe this grouping would be too foreign and create artificial boundaries which we usually don’t do in Elixir. For example, we don’t require explicit boundaries for macros or private stuff. Generally Elixir modules are groups of functions, without extra nesting, and we use anotations such as <code>defp</code> or module attributes to classify some particular functions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22436" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-22436" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22436"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="22437" data-post-id="22437">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>: oh, I see your point<br>
hmm, so next idea:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyProject.MyModule do
  use MyProject.MyFirstBehavior

  # @impl is false or nil here ...
  # normal methods here ...

  @impl MyProject.MyFirstBehavior
  # all methods for our first behavior

  @impl fasle
  # normal methods
end
</code></pre>
<p>This is more strict for developer, but it’s not nested / grouped and it’s still possible to emit more warnings, right?<br>
Is it even possible to do that?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22437" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-22437" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22437"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="22438" data-post-id="22438">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Eiji" data-post="18" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>This is more strict for developer, but it’s not nested / grouped and it’s still possible to emit more warnings, right?Is it even possible to do that?</p>
</blockquote>
</aside>
<p>It is likely possible but, again, it is foreign. We don’t use this idiom anywhere else in Elixir.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22438" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-22438" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22438"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="22440" data-post-id="22440">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>: ok, I see that you’ve already thought about all possible cases.<br>
I don’t have other questions. I think that I understand “your way” little better and also agree with it. <img src="https://forum.elixirforum.com/images/emoji/apple/smile.png?v=15" title=":smile:" class="emoji" alt=":smile:" loading="lazy" width="20" height="20"><br>
Thanks for your time!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22440" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-22440" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22440"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="22469" data-post-id="22469">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="14" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<pre data-code-wrap="elixir"><code class="lang-elixir">impl MyBehaviour do
  def bar, do: :ok
  ...
end
</code></pre>
<p>but I believe the above looks… too foreign?</p>
</blockquote>
</aside>
<p>Ooo, I actually quite like that to be honest…  Maybe a <code>defimplement</code> or so?  Or <code>defoverride</code>?</p>
<p><em>/me is not actually suggesting this, just playing with ideas…</em></p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="14" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>Unfortunately we cannot make it required because that would emit too many warnings. However, we can guarantee that, if you have used <span class="mention">@impl</span> true once in a module, you have to use it for all callback implementations.</p>
</blockquote>
</aside>
<p>Can we have a mix.exs option / switch that enables it to always warning when not used in all cases so we can yell at dependencies that do not implement it properly?  ^.^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22469" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-22469" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22469"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
    <div class="postbit" id="22473" data-post-id="22473">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="21" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Can we have a mix.exs option / switch that enables it to always warning when not used in all cases so we can yell at dependencies that do not implement it properly?  ^.^</p>
</blockquote>
</aside>
<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> I absolutely second this. I realize it might be confusing and introduce the possibility of inadvertent mistakes but I’ll leave this deliberation to you and the others of the core team.</p>
<p>My take is that having the option to make the compiler more strict is a wanted feature. Some of us just want to get the job done and move on, but others (like me and apparently <a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a>) want to also minimize the possibility of future problems.</p>
<p>My $0.02.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22473" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-22473" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22473"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="22481" data-post-id="22481">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eproxus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eproxus/120/3497_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eproxus
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="14" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>Unfortunately we cannot make it required because that would emit too many warnings. However, we can guarantee that, if you have used <span class="mention">@impl</span> true once in a module, you have to use it for all callback implementations.</p>
</blockquote>
</aside>
<p>This I don’t quite understand. You’re saying if <code>@impl true</code> shows up before just one of the callbacks, the others will be automatically given warnings? That either doesn’t make sense (you only wanted to implement one of the optional callbacks) or it could be done for all automatically (initiated by the <code>use</code> in the first place).</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="14" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>eproxus:<br>
It also separates the behaviour inclusion into different parts in the module.</p>
<p>I am not sure I follow. The point is exactly to associate the usage of the behaviour with its implementation. The only way to keep it together would be with something like:</p>
</blockquote>
</aside>
<p>What I meant was that the intention to use a behaviour is now “shown” in two places, not just one (i.e. first the <code>use</code> and then the <code>@impl</code>. Wether that is a good or bad thing is subjective. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="21" data-topic="3338">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Ooo, I actually quite like that to be honest…  Maybe a defimplement or so?  Or defoverride?</p>
</blockquote>
</aside>
<p>Yeah, I thought about something similar. Would it be possible to do <code>def GenServer.handle_call(...)</code>?</p>
<p>A list of the ideas in this thread so far:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">@impl true
def handle_call(message, from, state) do
  # ...
end@impl GenServer

def handle_call(message, from, state) do
  # ...
end

defimpl handle_call(message, from, state) do
  # ...
end

def GenServer.handle_call(message, from, state) do
  # ...
end

impl GenServer do
  def handle_call(message, from, state) do
    # ...
  end
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22481" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviours-defoverridable-and-implementations/3338/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-22481" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22481"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/3338/load_more?page=3">Load more posts</a>
</div></template></turbo-stream>