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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I agree with everything Tomek has said. Making short messages optional could be the best of both worlds?</p>
<p>Introducing an extra step to get the long explanation will probably be ignored by many - partly because over a period of time they will subconsciously learn to ignore them (either because they may have needed more info by googleing in the past, or because the long message might not have helped them and they needed to google anyway) and partly because it’s an extra step, usually people will avoid extra steps unless they feel it nescessery or strongly likely to yield what they want.</p>
<p>However if this is too much of a burden for the Core team then I support whatever is easiest for them <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 group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="15718">
<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><strong>Question 1:</strong> what do think about the idea of supporting help catalog in general? (regardless of the command structure, syntax, etc)</p>
</blockquote>
</aside>
<p>I think it would be a nice addition (if made optional as per above). However I worry it may be adding more work for the core team.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="15718">
<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><strong>Question 2:</strong> what do you think about the suggested syntax for catalogs and its implementation?</p>
</blockquote>
</aside>
<p>Looks good!</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="15718">
<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><strong>Question 3:</strong> should we close the gap and allow help and open generally available in the <code>elixir</code> and <code>mix run</code> commands?</p>
</blockquote>
</aside>
<p>I think it makes sense, yes <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="91927" 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/proposal-introduce-help-catalogs/15718/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-91927" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91927"
                     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="91928" data-post-id="91928">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GregMefford" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GregMefford/120/4875_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GregMefford
                  </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="1" data-topic="15718">
<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><strong>Question 1:</strong> what do think about the idea of supporting help catalog in general? (regardless of the command structure, syntax, etc)</p>
</blockquote>
</aside>
<p>We should do this. <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"></p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="15718">
<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><strong>Question 2:</strong> what do you think about the suggested syntax for catalogs and its implementation?</p>
</blockquote>
</aside>
<p>This proposal is acceptable, but I wonder if it would be easier from inside <code>iex</code> if the thing you needed to type was just a module name, so that you’d get automatic tab-completion. The other nice thing here is that it’s just regular old doc strings that we already have today. No need to do anything fancy to find the catalog module because the module/function name is directly given to you.</p>
<p>For example:</p>
<pre data-code-wrap="iex"><code class="lang-iex">iex&gt; h Elixir.Help.nested_var
</code></pre>
<p>From the shell, you could do either:</p>
<pre data-code-wrap="bash"><code class="lang-bash">$ elixir -h nested_var
</code></pre>
<p>If no module is specified, <code>Elixir.Help</code> would be assumed. For library-based help catalogs, you just need to be explicit:</p>
<pre data-code-wrap="bash"><code class="lang-bash">$ elixir -h SomeLibrary.Help.some_catalog_entry
</code></pre>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="15718">
<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><strong>Question 3:</strong> should we close the gap and allow help and open generally available in the <code>elixir</code> and <code>mix run</code> commands?</p>
</blockquote>
</aside>
<p>Yes</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91928" 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/proposal-introduce-help-catalogs/15718/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-91928" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91928"
                     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="91929" data-post-id="91929">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="blatyo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/blatyo/120/4554_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  blatyo
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Conduit Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="grych" data-post="11" data-topic="15718">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/48/5610_2.png" class="avatar"> grych:</div>
<blockquote>
<p>What if we do short messages optional? Like, by default, showing long messages (warning + help from the catalogue) and allow to turn on short messages by a switch <code>--short-messages</code> or an entry in <code>.elixir</code> ?</p>
</blockquote>
</aside>
<p>I’d be in favor of this.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91929" 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/proposal-introduce-help-catalogs/15718/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-91929" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91929"
                     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="91934" data-post-id="91934">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jgonet" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jgonet/120/11084_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jgonet
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Popcorn Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>The downside of those messages are that, for experienced developers, they end-up being too much noise.</p>
</blockquote>
<p>I wonder if embedding catalog name of warning and adding info on top would improve readability - changing:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: nested variable "baz" is unused (elixir --explain nested_var)
</code></pre>
<p>to:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">View detailed explanation of warnings by elixir --explain &lt;warning name&gt;

[nested_var] warning: nested variable "baz" is unused
[another_warning] warning: this is another warning
</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="91934" 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/proposal-introduce-help-catalogs/15718/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-91934" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91934"
                     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="91944" data-post-id="91944">
  <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>There have been some concerns regarding the loss of precision in warnings, which is an excellent concern. I will address them altogether instead of individually.</p>
<p>We are not proposing to remove all long warnings and all long errors. Rather, this is a mechanism that would allow them to do so, if desired and if relevant.</p>
<p><a class="mention" href="/u/eiji" rel="nofollow">@Eiji</a> mentioned an excellent example: function clause errors. Those errors are long, and they will continue to be long, because everything they show is contextual information. <a class="mention" href="/u/blatyo" rel="nofollow">@blatyo</a> brought another good example. Both of those cases should continue as is. <strong>The help catalog is useful to store complementary and non-contextual information about warnings and errors. All contextual information should remain as part of the warning/error</strong>.</p>
<p>===</p>
<p>The other concern that seems to be common is about emitting detailed (long) warnings by default. This seems like a good idea based on the warnings we have today but I would like to remind everyone that, <strong>once the catalog exists, it is very likely that many warnings will provide a detailed variant</strong>.</p>
<p>For example, “unused variable x” may now have one or two paragraphs about prepending an underscore to the variable name. Similarly, when you use a non-guard function in a guard, I would like the detailed information to show all available guards. Therefore, if we are detailed by default, we may end-up showing a lot more information than we do today. For those reasons, I think detailed by default is practical today, but not when the catalog will be place.</p>
<p>I would like to flip the question. Instead of discussing if we should have “shorter vs long” by default, <strong>what can we do to make sure that a newcomer will understand what</strong> <code>elixir -h elixir:foobar</code> <strong>in a warning/error means</strong> and make sure that they will be able to access the detailed information?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91944" data-batch-url="/posts/batch_likers">
                        4
                      </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/proposal-introduce-help-catalogs/15718/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-91944" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91944"
                     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="91945" data-post-id="91945">
  <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="GregMefford" data-post="15" data-topic="15718">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregmefford/48/4875_2.png" class="avatar"> GregMefford:</div>
<blockquote>
<p>If no module is specified, <code>Elixir.Help</code> would be assumed. For library-based help catalogs, you just need to be explicit:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ elixir -h SomeLibrary.Help.some_catalog_entry
</code></pre>
</blockquote>
</aside>
<p>I thought about a module based mechanism but it has a couple issues:</p>
<ul>
<li>
<p>Today <code>help is_atom</code> shows the documentation for the <code>Kernel</code> module. Do we want to keep this behaviour for the command line? If so, there is an ambiguity if what you propose.</p>
</li>
<li>
<p>The module names for libraries end-up getting log</p>
</li>
<li>
<p>I would like the catalog information to be possibly dynamic. For example, Phoenix could look into the user configuration and say “you can change this behaviour by setting X, it is currently set to false”. In Elixir, for example, I would like for <code>elixir:guards</code> to show all guards.</p>
</li>
</ul>
<p>Thoughts? <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="jgonet" data-post="17" data-topic="15718">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jgonet/48/11084_2.png" class="avatar"> jgonet:</div>
<blockquote>
<p>I wonder if embedding catalog name of warning and adding info on top would improve readability - changing:</p>
</blockquote>
</aside>
<p>This is hard to do in Elixir. Compiling code is the same as running code. We do not have explicit “compilation started” and “compilation ended” events. On the positive side, it means we can use the catalog for runtime warnings and errors too.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91945" data-batch-url="/posts/batch_likers">
                        0
                      </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/proposal-introduce-help-catalogs/15718/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-91945" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91945"
                     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="91946" data-post-id="91946">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jgonet" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jgonet/120/11084_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jgonet
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Popcorn Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’d go with longer warnings by default, as shorted may or may not be as descriptive. More advanced user will recognize warning without need of detailed description, newcomers not really. I think if we place information about <code>--short</code> somewhere in docs it will be sufficient.<br>
Maybe going with 3 lvls of description is good idea? short as option, medium by default and long in catalog?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91946" data-batch-url="/posts/batch_likers">
                        0
                      </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/proposal-introduce-help-catalogs/15718/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-91946" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91946"
                     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="91947" data-post-id="91947">
  <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="jgonet" data-post="21" data-topic="15718" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jgonet/48/11084_2.png" class="avatar"> jgonet:</div>
<blockquote>
<p>I’d go with longer warnings by default, as shorted may or may not be as descriptive. More advanced user will recognize warning without need of detailed description, newcomers not really. I think if we place information about <code>--short</code> somewhere in docs it will be sufficient.</p>
</blockquote>
</aside>
<p>Apologies but this does not address my main concern: most warnings we have today will likely become much longer. Would you advocate for long warnings if every unused variable warning comes with one or two extra pagraphs? Or if errors in guards comes with a list of all guards? It feels people are advocating for long warnings based on their experience today but this experience will no longer be true once we have catalogs. Today warnings were written to try to balance between too little and too much information, which may end-up not pleasing newcomers nor experienced developers. Once we have catalogs, the amount of information is much more, and showing it by default will be overly distracting.</p>
<p>What would be the difference between a short, medium or long warning? It seems there is an impression that a catalog means most warnings will become useless by default but that’s not the case. Even with a catalog, <strong>every warning will still provide enough information to be addressable on its own.</strong></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91947" 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/proposal-introduce-help-catalogs/15718/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-91947" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91947"
                     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="91951" data-post-id="91951">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jgonet" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jgonet/120/11084_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jgonet
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Popcorn Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think to strike a balance with 3 levels of warnings would be like so:</p>
<ul>
<li>short - warnings that are emitted now, short and clean</li>
<li>long - warning with max 2 paragraphs, enough to give options or hints how it can be fixed</li>
<li>detailed - more than long: references to other functions or modules, links,<br>
maybe some examples “do this, don’t do that”, basically connect warnings with docs.<br>
So when you have unused variable warning I’d go with something like</li>
</ul>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: variable "unused" is unused (did you mean `_unused` ?)
</code></pre>
<p>or</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: variable "unused" is unused, add leading underscore to mark it if you're not using it intentionally.
</code></pre>
<p>if you have for example clauses warning:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">iex(4)&gt; defmodule Foo do  
...(4)&gt; def f(_), do: 1 
...(4)&gt; def f(2), do: 2
...(4)&gt; end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: this clause cannot match because a previous clause at line 5 always matches
</code></pre>
<p>you can make it like so:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: this clause cannot match because a previous clause at line 5 always matches
Rearrange clauses to match arguments gradually, more info at &lt;catalog help page&gt;
</code></pre>
<p>or something in this spirit.</p>
<p>That’s my thoughts, hopefully it helps somehow.</p>
<p>BTW: is there a way to peek warnings strings in Elixir code? I’m not very experienced and couldn’t find them anywhere.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="91951" 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/proposal-introduce-help-catalogs/15718/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-91951" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91951"
                     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>
    <div class="postbit" id="91962" data-post-id="91962">
  <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>Thanks, that helps to see what you mean. But I think we can strike a balance between short and medium, in a way we don’t need to add even more options, and still keep warnings relevant. We have been mostly fine with one so far and having two should be an improvement, we probably don’t need a third. <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="91962" 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/proposal-introduce-help-catalogs/15718/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-91962" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="91962"
                     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>
</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/15718/load_more?page=3">Load more posts (27 remaining)</a>
</div></template></turbo-stream>