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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I wrote why I dislike hiding an <code>if</code> behind <code>&amp;&amp;</code> and <code>else</code> behind <code>||</code> in <a href="http://michal.muskala.eu/2016/01/04/if-considered-harmful-or-is-it.html#why-if-is-any-good" rel="noopener nofollow ugc">this article</a>.</p>
<blockquote>
<p>When you think about teaching programming, what’s the first thing you want someone to learn? It’s <code>if</code>! It’s the most basic construct in nearly every programming language. Every programmer knows <code>if</code>, every programmer wrote thousands upon thousands of <code>if</code>s. Every programmer knows what <code>if</code> means and what was the intention of the coder who wrote it.<br>
[…]</p>
</blockquote> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="35049" 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/what-would-you-remove-from-elixir/5622/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-35049" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35049"
                     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="35051" data-post-id="35051">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I disagree with your article but that’s not the point. The point is that if you rewrote your befores using <code>if</code> they would be verbose 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="35051" 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/what-would-you-remove-from-elixir/5622/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-35051" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35051"
                     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>
    <div class="postbit" id="35052" data-post-id="35052">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The thing is, I didn’t have to. I feel completely comfortable with a single <code>&amp;&amp;</code> operator. I feel completely not comfortable with a combination of <code>&amp;&amp;</code> and <code>||</code> to emulate an <code>if</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="35052" 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/what-would-you-remove-from-elixir/5622/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-35052" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35052"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="35053" data-post-id="35053">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I often find myself writing multiline statements that depend on boolean values, which however do not warrant their own named function. For this, <code>if/else</code> is very useful.</p>
<p>(For the <code>min</code> example of <a class="mention" href="/u/michalmuskala" rel="nofollow">@michalmuskala</a>’s blog post, I think I’d be most happy with this form:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def min(a, b) when a &lt; b, do: a
def min(_a, b), do: b
</code></pre>
<p>)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="35053" 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/what-would-you-remove-from-elixir/5622/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-35053" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35053"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="35055" data-post-id="35055">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Also, I don’t think <code>{:ok, _}</code> and <code>:error</code> are very appropriate in this situation. It’s not an error if the element doesn’t match what you’re looking for. Something more descriptive would be better, like <code>:notfound</code>.</p>
<p>It’s unconventional (as far as I know), but I think an idiom where a single element tuple holds a value in cases where only a single value must be returned could be introduced to reduce complexity.</p>
<pre><code>Enum.search(list, fn(item) -&gt; ... &amp;&amp; {item} || :notfound 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="35055" 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/what-would-you-remove-from-elixir/5622/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-35055" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35055"
                     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 #35"></div>
  </section>
</div>
    <div class="postbit" id="35056" data-post-id="35056">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Your arguments against boolean operators seem to be a) that they don’t make long conditionals like</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  if (vehicle.type == :car)
    drive(vehicle)
  elsif (vehicle.type == :plane)
    fly(vehicle)
  else
    sail(vehicle)
  end
</code></pre>
<p>any better, and b) that there’s nothing wrong with <code>if</code> in the first place. However, wouldn’t you agree that the complexity in your after examples is cause by the <code>if</code>s? The boolean operators in my example are not long conditionals either. From your article, I don’t see any reasons not to choose <code>&amp;&amp;</code> <code>||</code> over <code>if</code> in this situation.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="35056" 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/what-would-you-remove-from-elixir/5622/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-35056" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35056"
                     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 #36"></div>
  </section>
</div>
    <div class="postbit" id="35057" data-post-id="35057">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t know about others, but whenever I see <code>foo? &amp;&amp; bar || baz</code> I have to “parse” it to an <code>if</code> before I can understand the code. That’s why I call it “emulation” - for me it looks like a fancy way to make your code “if-free” (that seems to be a popular metric lately) without actually giving any real benefits.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="35057" 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/what-would-you-remove-from-elixir/5622/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-35057" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35057"
                     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 #37"></div>
  </section>
</div>
    <div class="postbit" id="35058" data-post-id="35058">
  <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>Firstly I would like to remove bugs <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" 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="35058" 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/what-would-you-remove-from-elixir/5622/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-35058" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35058"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="35059" data-post-id="35059">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="michalmuskala" data-post="38" data-topic="5622">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/michalmuskala/48/20288_2.png" class="avatar"> michalmuskala:</div>
<blockquote>
<p>foo? &amp;&amp; bar || baz</p>
</blockquote>
</aside>
<p>I only do that if I’m doing ElixirGolf and trying to save a few characters for fun. Do you really see that in production code?!? <img src="https://forum.elixirforum.com/images/emoji/apple/scream.png?v=15" title=":scream:" class="emoji" alt=":scream:" 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="35059" 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/what-would-you-remove-from-elixir/5622/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-35059" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35059"
                     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 #39"></div>
  </section>
</div>
    <div class="postbit" id="35061" data-post-id="35061">
  <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" data-username="michalmuskala" data-post="29" data-topic="5622">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/michalmuskala/48/20288_2.png" class="avatar"> michalmuskala:</div>
<blockquote>
<p>Turning to tuples everywhere, unfortunately, isn’t a viable solution. Just couple days ago, there was an issue about replacing the “awfully nil-ridden” Enum.find_value (and friends). This would mean, however, in many places replacing code that is very readable and simple with something very complex.</p>
</blockquote>
</aside>
<p>Indeed it would, but that is only because of the current patterns that are used.  Following your example but with a monadic style (from <a href="https://forum.elixirforum.com/t/with-do/5602/36" rel="nofollow">this</a> thread) it would change from:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">content =
  Enum.find_value(sources, fn source -&gt;
    File.exists?(source) &amp;&amp; File.read!(source)
  end) || raise "could not find #{source_file_path} in any of the sources"
</code></pre>
<p>To if <code>Enum.find_value</code>’s callback an option tuple (<code>{:ok, blah}</code>|<code>:error</code>) (using module helpers as stated should be made in the above linked thread):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">{:ok, content} =
  Enum.find_value(sources, &amp;Option.from_result(File.read(&amp;1)))
  ~&gt; fn _ -&gt; raise "could not find #{source_file_path} in any of the sources" end
  # Or do `|&gt; unwrap()` here and replace the binding above with just `content =`
</code></pre>
<p>And for the other example of:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Enum.find_value(headers, fn({k, v}) -&gt; k =~ ~r/^origin$/i &amp;&amp; v end)
</code></pre>
<p>To if <code>Enum.find_value</code>’s callback an option tuple (<code>{:ok, blah}</code>|<code>:error</code>) (using module helpers as stated should be made in the above linked thread):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Enum.find_value(headers, fn({k, v}) -&gt; Option.wrap_if(k =~ ~r/^origin$/i, v) end
</code></pre>
<p>And the third example of:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp check_operations_valid(operations) do
  Enum.find_value(operations, &amp;invalid_operation/1) || {:ok, operations}
end

defp invalid_operation({name, {:changeset, %{valid?: false} = changeset, _}}),
  do: {:error, {name, changeset, %{}}}
defp invalid_operation(_operation),
  do: nil
</code></pre>
<p>To if <code>Enum.find_value</code>’s callback an option tuple (<code>{:ok, blah}</code>|<code>:error</code>) (using module helpers as stated should be made in the above linked thread):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp check_operations_valid(operations) do
  Enum.find_value(operations, &amp;invalid_operation/1)
  |&gt; Result.from_option(operations) # Takes the optional error value, only evaluated if an `:error`
  |&gt; Result.flip() # Flip the `:error` and `:ok` cases
end

defp invalid_operation({name, {:changeset, %{valid?: false} = changeset, _}}),
  do: {:ok, {name, changeset, %{}}}
defp invalid_operation(_operation),
  do: :error
</code></pre>
<p>Which although a bit longer I find more readable rather than the easily missed (since I did originally miss it) trailing <code>|| {:ok, operations}</code> bit.</p>
<p>Tagged Tuples are far superior, especially with conditional piping as well.</p>
<aside class="quote no-group" data-username="net" data-post="36" data-topic="5622">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>Also, I don’t think {:ok, _} and :error are very appropriate in this situation. It’s not an error if the element doesn’t match what you’re looking for. Something more descriptive would be better, like :notfound.</p>
</blockquote>
</aside>
<p>Entirely true, and gets back to what I say should be properly named return values.  Although if we could drop the erlang heritage and big erlang style I’d say the <code>option</code> type should be <code>{:some, value}</code>/<code>:none</code> and the <code>result</code> type should be <code>{:ok, value}</code>/<code>{:error, result}</code> or something along those lines, but <code>{:ok, value}</code>/<code>:error</code> is definitely more erlang’y and there is a lot of history and code there.</p>
<aside class="quote no-group" data-username="net" data-post="36" data-topic="5622">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>It’s unconventional (as far as I know), but I think an idiom where a single element tuple holds a value in cases where only a single value must be returned could be introduced to reduce complexity.</p>
</blockquote>
</aside>
<p>I’ve also been for that too, doing the option as <code>{value}</code>/<code>:error</code> (or <code>:none</code> or whatever) would make sense, but there is no precedence for that either.</p>
<aside class="quote no-group" data-username="net" data-post="37" data-topic="5622">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>any better, and b) that there’s nothing wrong with if in the first place. However, wouldn’t you agree that the complexity in your after examples is cause by the ifs? The boolean operators in my example are not long conditionals either. From your article, I don’t see any reasons not to choose &amp;&amp; ||overif in this situation.</p>
</blockquote>
</aside>
<p>That example would be significantly better with <code>cond</code>, yet another reason I encourage either purging <code>if</code> as-it-stands from the language, or forcing an <code>else</code> clause, <em>always</em>.  I really do not like this magically appearing <code>nil</code> from invisible <code>else</code>’s.</p>
<aside class="quote no-group" data-username="michalmuskala" data-post="38" data-topic="5622" 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/michalmuskala/48/20288_2.png" class="avatar"> michalmuskala:</div>
<blockquote>
<p>I don’t know about others, but whenever I see foo? &amp;&amp; bar || baz I have to “parse” it to an if before I can understand the code. That’s why I call it “emulation” - for me it looks like a fancy way to make your code “if-free” (that seems to be a popular metric lately) without actually giving any real benefits.</p>
</blockquote>
</aside>
<p>Agreed yep, hence why I want some construct that <em>forces</em> the <code>else</code> to exist, no magically appearing <code>nil</code>’s and such.</p>
<aside class="quote no-group" data-username="Eiji" data-post="39" data-topic="5622">
<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>Firstly I would like to remove bugs <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>Which gets back to my wanting to fix the scoping brokenness.  :-V</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="35061" 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/what-would-you-remove-from-elixir/5622/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-35061" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="35061"
                     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 #40"></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/5622/load_more?page=5">Load more posts (43 remaining)</a>
</div></template></turbo-stream>