<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="22484" data-post-id="22484">
  <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="eproxus" data-post="23" 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>This I don’t quite understand. You’re saying if <span class="mention">@impl</span> true 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 use in the first place).</p>
</blockquote>
</aside>
<p>If you provide <span class="mention">@impl</span> true for any of the callback implementations, any other implementation you have in the same module will also require the use of <span class="mention">@impl</span> true. For example, if you have handle_call and handle_info and you add <code>@impl true</code> to only one of them, the other will warn. The callbacks you have not explicitly implemented won’t require <code>@impl true</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22484" 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/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-22484" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22484"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="22487" data-post-id="22487">
  <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 no-group quote-modified" data-username="eproxus" data-post="23" 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>Yeah, I thought about something similar. Would it be possible to do def GenServer.handle_call(…)?</p>
</blockquote>
</aside>
<p>Aah, that is also very nice, but what if overlap in behaviour callbacks?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22487" 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/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-22487" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22487"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="22491" data-post-id="22491">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="christhekeele" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/christhekeele/120/1039_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  christhekeele
                  </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="10" 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>Yup. We already have a guide on behaviours and we can further extend that. The plan was also to extend the defoverridable implementation to point towards best practices, like backing up your overridable functions with behaviours, which we currently don’t.</p>
</blockquote>
</aside>
<p>Oh cool, are you saying that this:</p>
<pre><code>defmodule GenServer do
  @callback handle_call(message, from, state)
  @optional_callbacks handle_call: 3

  defmacro __using__(_) do
    quote do
      @behaviour GenServer

      def handle_call(msg, from, state) do
        IO.puts inspect state
        {:ok, state}
      end
    end
  end
end
</code></pre>
<p>Would be able to be expressed as this:</p>
<pre><code>defmodule GenServer do
  @callback handle_call(message, from, state)
  # Or whatever the macro would be called
  defoptional_callback handle_call(msg, from, state) do
    IO.puts inspect state
    {:ok, state}
  end

  defmacro __using__(_) do
    quote do
      # Now so terse, it's hard to justify the __using__
      @behaviour GenServer
      Behaviour.derive GenServer # or w/e syntax for hooking into the macro
    end
  end
end
</code></pre>
<p>That would be awesome!</p>
<p>It might also give us a hook to address some pain points in best practices, via additional capabilities:</p>
<ul>
<li>
<p>Two behaviours have an overlapping interface (ie <code>start_link/1</code>), each with defaults, and you want a module that implements them both:</p>
<pre><code>  defmodule Overlap do
    @behaviour GenServer
    @behaviour AlsoHasStartLink
    Behaviour.derive GenServer, except: [start_link: 1]
    Behaviour.derive AlsoHasStartLink
  end
</code></pre>
</li>
<li>
<p>Default overridable behaviour implementations are a pain to test since they live entirely inside quotes. <code>defoptional_callback</code> helps move them outside the quote and closer to the behaviour callback it implements. Is there a good way it could also make the optional implementation available on the behaviour module itself for testing, so we don’t have to set up dummy test modules to <code>use</code> them into? I can’t think of a good way to do this, but someone cleverer than I might.</p>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22491" 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/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-22491" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22491"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="22494" data-post-id="22494">
  <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="24" 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>If you provide <span class="mention">@impl</span> true for any of the callback implementations, any other implementation you have in the same module will also require the use of <span class="mention">@impl</span> true. For example, if you have handle_call and handle_info and you add <span class="mention">@impl</span> true to only one of them, the other will warn. The callbacks you have not explicitly implemented won’t require <span class="mention">@impl</span> true.</p>
</blockquote>
</aside>
<p>So it is only based on the name of the callbacks? What if I add it to one optional callback implementation, and the other is just another function named the same as an optional callback (but with a different arity)? If the programmer just wanted another function that happens to have an overlapping name, it would be a false warning, no?</p>
<p>I still think <code>@impl true</code> adds more confusion that it solves. The name is also too generic in my opinion.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22494" 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/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-22494" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22494"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="22499" data-post-id="22499">
  <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="eproxus" data-post="27" 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>So it is only based on the name of the callbacks?</p>
</blockquote>
</aside>
<p>No, name and arity.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22499" 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/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-22499" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22499"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="22500" data-post-id="22500">
  <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="christhekeele" data-post="26" 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/christhekeele/48/1039_2.png" class="avatar"> christhekeele:</div>
<blockquote>
<p>Two behaviours have an overlapping interface (ie start_link/1), each with defaults, and you want a module that implements them both:<br>
defmodule Overlap do<br>
<span class="mention">@behaviour</span> GenServer<br>
<span class="mention">@behaviour</span> AlsoHasStartLink<br>
Behaviour.derive GenServer, except: [start_link: 1]<br>
Behaviour.derive AlsoHasStartLink<br>
end</p>
</blockquote>
</aside>
<p>That won’t work. Whatever is calling your code, such as a GenServer, can’t know which one you picked. Conflicting behaviours are always going to be an error.</p>
<p>There seems to be a lot of confusion on this thread related to what is a behaviour and what are overridable functions. You can’t derive a behaviour because a behaviour has no default implementations to derive.</p>
<aside class="quote no-group" data-username="christhekeele" data-post="26" 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/christhekeele/48/1039_2.png" class="avatar"> christhekeele:</div>
<blockquote>
<p>defoptional_callback handle_call(msg, from, state) do</p>
</blockquote>
</aside>
<p>And no, that’s not what is being proposed. <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"> Behaviours and protocols are abstract, they don’t provide implementations (and they won’t). This is about making it clear when you are implementing a particular behaviour.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22500" 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/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-22500" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22500"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="22573" data-post-id="22573">
  <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="28" 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>No, name and arity.</p>
</blockquote>
</aside>
<p>Maybe I misunderstood, but wasn’t the warning supposed to be about a mismatch in arity? If a behaviour exposes the optional callbacks <code>foo/1</code> and <code>bar/2</code>, and I put an <code>@impl true</code> in front of my <code>foo/1</code> and I have a <code>bar/3</code>, what would happen?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22573" 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/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-22573" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22573"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="22576" data-post-id="22576">
  <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>No, we will warn if you put <code>@impl true</code> before a function and there is no callback with that exact name and arity. It is not about a partial match on the name or arity. And once you use <code>@impl true</code> in a given module, we will require all callbacks to be properly tagged as <code>@impl true</code>.</p>
<p>Can you please re-read the original proposal and try to pinpoint which part may have led you to think it is something specific to a given name or arity, so we can further clarify it?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22576" 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/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-22576" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22576"
                     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 #30"></div>
  </section>
</div>
    <div class="postbit" id="22578" data-post-id="22578">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="christhekeele" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/christhekeele/120/1039_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  christhekeele
                  </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="29" 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>Behaviours and protocols are abstract, they don’t provide implementations (and they won’t).</p>
</blockquote>
</aside>
<p>Gotcha, I think I just read too much into “extend the defoverridable implementation to point towards best practices”; and read “help backing up your overridable functions with behaviours” as "help backing up your behaviours with default overridable functions.</p>
<p>I think we’re on the same page now, and definitely 100% on this proposal. <img src="https://forum.elixirforum.com/images/emoji/apple/thumbsup.png?v=15" title=":thumbsup:" class="emoji" alt=":thumbsup:" 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="22578" 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/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-22578" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22578"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="22584" data-post-id="22584">
  <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">
								<p>I think I get it now: If <code>@impl true</code> is used, the function marked will get tested against any existing optional callback and a warning will get issued if none is found. If <code>@impl true</code> is used somewhere, all functions that match an optional callback pattern will get warnings if they themselves don’t use <code>@impl true</code>. Correct me if I’m wrong.</p>
<p>Therefore, if a function exists that does not match the pattern of an optional callback (different name or arity) no warnings would be issued. Which I thought was the case, but I’m not sure from where. I guess it was the combo of “arity mismatch warning” and “other callbacks will get warnings if <code>@impl true</code> is used once”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="22584" 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/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-22584" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="22584"
                     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 #32"></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=4">Load more posts (5 remaining)</a>
</div></template></turbo-stream>