<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="102958" data-post-id="102958">
  <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="mmport80" data-post="69" 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/mmport80/48/8995_2.png" class="avatar"> mmport80:</div>
<blockquote>
<p>everything is just a reduce ; ) but i was messing around with maps with a colleague, and saw the map is a much closer analogy</p>
</blockquote>
</aside>
<p>Except map cannot filter or transform the return type to a different container type, where <code>for</code> can.</p>
<aside class="quote no-group" data-username="mmport80" data-post="69" 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/mmport80/48/8995_2.png" class="avatar"> mmport80:</div>
<blockquote>
<p>thing is, <em>random_library_authors</em> think they knew some new language feature that will solve our woes - mostly not the case : (</p>
</blockquote>
</aside>
<p>This is actually a great argument for making macro’s Less easy, which there are indeed some great arguments for.  However I think tooling could fix it far better while keeping Macro’s easy, however the tooling that would really help would not easily exist without the language being strongly statically typed, which Elixir very much is not right now.</p>
<aside class="quote no-group" data-username="mmport80" data-post="69" 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/mmport80/48/8995_2.png" class="avatar"> mmport80:</div>
<blockquote>
<p>The semantics are good, the syntax is indeed in need of a spring clean : )</p>
</blockquote>
</aside>
<p>The syntax comes from them being Special Forms instead of just Macro’s.  Really most of Elixir could be implement ‘in’ elixir directly as macro’s as long as we have our currently existing <code>case</code> special form or some method to build it.  ^.^</p>
<aside class="quote no-group" data-username="Qqwy" data-post="70" 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/qqwy/48/1349_2.png" class="avatar"> Qqwy:</div>
<blockquote>
<p>I would remove the current <code>Enum.map</code> and similar functions, and replace them by ones that make more clear that we are destroying the structure and returning a list while mapping. And I would like to introduce a new built-in Protocol that allows you to iterate over things while keeping their structure. (So a <em>transforming</em> map rather than a <em>destructive</em> one)</p>
</blockquote>
</aside>
<p>So… monad interfaces?  <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" 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="102958" 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/72">Post #71</a>
	                </div>
	            </div>
              <div id="likers-container-102958" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="102958"
                     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 #71"></div>
  </section>
</div>
    <div class="postbit" id="103067" data-post-id="103067">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mmport80" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mmport80/120/8995_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mmport80
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="72" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Except map cannot filter or transform the return type to a different container type, where <code>for</code> can.</p>
</blockquote>
</aside>
<p>Ugh yeh, forgot about that sort of thing.</p>
<p>I use for loops once or twice a year in any language. Thankfully..</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="72" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>The syntax comes from them being Special Forms instead of just Macro’s. Really most of Elixir could be implement ‘in’ elixir directly as macro’s as long as we have our currently existing <code>case</code> special form or some method to build it. ^.^</p>
</blockquote>
</aside>
<p>agreed</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="OvermindDL1" data-post="68" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<blockquote>
<p>Maybe that could be lifted, but I think it would greatly complicate the parser.</p>
</blockquote>
<p>No, it already can be that, the issue is that using it would then require doing <code>42 |&gt; &amp;someFunction(&amp;1, 1, 2)</code> . <code>|&gt;</code> is a normal infix operator, you can implement it as a normal function or as an operator, it works fine either way, but by using a macro it allows a more ‘normal’ function call syntax, even though honestly I would rather kind of prefer the currying syntax, but you’d have to hope it gets optimized out, and honestly it probably wouldn’t (though a macro could fix that).</p>
</blockquote>
</aside>
<p>I was talking about “user defined” operators, not about different form of parsing <code>|&gt;</code> macro which is <a href="https://hexdocs.pm/elixir/Kernel.html#%7C%3E/2" rel="noopener nofollow ugc">plain old macro</a> so you can override is as you please. Currying is hard in BEAM languages (without help of any additional syntax) as there is no way to differentiate between <code>foo/1</code> and <code>foo/2</code> in that case, and if there would be currying built in into Elixir that do not need any “special syntax” then adding new method with lesser rarity than all existing ones could be breaking change.</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="68" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Eh technically some of those are special forms, although <code>with</code> could have been implemented with a better syntax as a macro in my opinion… &gt;.&gt;</p>
</blockquote>
</aside>
<p>TBH I thought it is implemented as regular macro. I do not know why it is in <code>Kernel.SpecialForms</code> o.O</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="68" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>I personally don’t know why they are maps, they should be tagged tuples on the beam, that is the usual ‘structural’ type after all…</p>
</blockquote>
</aside>
<p>The only reason why Erlang uses tuples instead of maps is that records are much older than maps (which became a thing in OTP 17). Both solutions have advantages and disadvantages and I think that using maps makes it more uniform (Erlang uses <code>#{}</code> for maps and <code>#name{}</code> for records, which can make it a little confusing) and simpler in implementation way (at least for me). And I think that Elixir way is better in “modern” OTPs.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="103576" 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/74">Post #73</a>
	                </div>
	            </div>
              <div id="likers-container-103576" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103576"
                     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 #73"></div>
  </section>
</div>
    <div class="postbit" id="103695" data-post-id="103695">
  <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="hauleth" data-post="74" 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/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>TBH I thought it is implemented as regular macro. I do not know why it is in <code>Kernel.SpecialForms</code> o.O</p>
</blockquote>
</aside>
<p>It is because it uses commas to separate expressions instead of a normal block as would be consistent with the rest of elixir (both <code>with</code> and <code>for</code> are horribly broken in this way I say…)</p>
<aside class="quote no-group" data-username="hauleth" data-post="74" 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/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>Currying is hard in BEAM languages (without help of any additional syntax) as there is no way to differentiate between <code>foo/1</code> and <code>foo/2</code> in that case</p>
</blockquote>
</aside>
<p>Or if you have type information.  ^.^</p>
<aside class="quote no-group" data-username="hauleth" data-post="74" 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/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>The only reason why Erlang uses tuples instead of maps is that records are much older than maps (which became a thing in OTP 17). Both solutions have advantages and disadvantages and I think that using maps makes it more uniform (Erlang uses <code>#{}</code> for maps and <code>#name{}</code> for records, which can make it a little confusing) and simpler in implementation way (at least for me). And I think that Elixir way is better in “modern” OTPs.</p>
</blockquote>
</aside>
<p>Not really, most structs are pretty small, meaning the record is a lot faster to parse and update and you don’t have to worry about it containing ‘extra fields’ like row-typing would handle (bugs waiting to 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="103695" 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/75">Post #74</a>
	                </div>
	            </div>
              <div id="likers-container-103695" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103695"
                     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 #74"></div>
  </section>
</div>
    <div class="postbit" id="103696" data-post-id="103696">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="75" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>It is because it uses commas to separate expressions instead of a normal block as would be consistent with the rest of elixir (both <code>with</code> and <code>for</code> are horribly broken in this way I say…)</p>
</blockquote>
</aside>
<p>Oh, yeah. I have forgot about that. Yeah, I think that using plain block would be better as well and would be more “<code>do</code>-like”. Maybe in Elixir 2.0 as I think it would be good choice. I do not think it would be possible with <code>for</code> though.</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="75" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Or if you have type information. ^.^</p>
</blockquote>
</aside>
<p>Typed Erlang/Elixir is completely different beast, however I think that it would be ambiguous like in this situation:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def foo(a), do: fn b -&gt; a * b end
def foo(a, b), do: a + b

fun = foo(a) # it will be curried `foo/2` or lambda returned by `foo/1`?
</code></pre>
<aside class="quote no-group" data-username="OvermindDL1" data-post="75" 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/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Not really, most structs are pretty small, meaning the record is a lot faster to parse and update and you don’t have to worry about it containing ‘extra fields’ like row-typing would handle (bugs waiting to happen!).</p>
</blockquote>
</aside>
<p>And that is why small maps (up to 32 keys) have such semantic under the hood (thanks to <a class="mention" href="/u/michalmuskala" rel="nofollow">@michalmuskala</a>) since OTP 21. The disadvantage of records is that in such case you need to know definitions upfront (that is why Erlang utilises <code>-include</code> macro with <code>.hrl</code> files). With one map per module it can be easier. We could make records in similar way, but:</p>
<ul>
<li>it would require record definition even for reading, you cannot use <code>foo.bar</code> to access field value, we would need different syntax for such actions, like <code>foo%MyRecord.bar</code> (following Erlang) or other sigil-magic</li>
<li>with OTP &lt;21 it would collide with <code>tuple_calls</code> feature of BEAM (as Elixir uses the same syntax for accessing fields and calling functions)</li>
</ul>
<p>So with current syntax “structures defined in form of records” would make a lot of things a lot harder.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="103696" 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/76">Post #75</a>
	                </div>
	            </div>
              <div id="likers-container-103696" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103696"
                     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 #75"></div>
  </section>
</div>
    <div class="postbit" id="103832" data-post-id="103832">
  <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="hauleth" data-post="76" 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/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>I do not think it would be possible with <code>for</code> though.</p>
</blockquote>
</aside>
<p>I have my own project that replaces <code>for</code> with a macro <code>comp</code>rehension.  ^.^</p>
<p>Mine decorates what you pass in with types (or ‘Access’ if not otherwise known) so it can generate optimal code for the specific types being used, meaning it’s faster than <code>for</code>.  It’s in one of my playground library and I should probably pull it out into it’s own project as it is quite functional…</p>
<p>My fairly trivial benchmark:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Helpers do
  use ExCore.Comprehension

  # map * 2

  def elixir_0(l) do
    for\
      x &lt;- l,
      do: x * 2
  end

  def ex_core_0(l) do
    comp do
      x &lt;- list l
      x * 2
    end
  end

  # Into map value to value*2 after adding 1

  def elixir_1(l) do
    for\
      x &lt;- l,
      y = x + 1,
      into: %{},
      do: {x, y * 2}
  end

  def ex_core_1(l) do
    comp do
      x &lt;- list l
      y = x + 1
      {x, y * 2} -&gt; %{} # line 35
    end
  end
end

inputs = %{
  "List - 10000 - map*2" =&gt; {:lists.seq(0, 10000), &amp;Helpers.elixir_0/1, &amp;Helpers.ex_core_0/1},
  "List - 10000 - into map +1 even *2" =&gt; {:lists.seq(0, 10000), &amp;Helpers.elixir_1/1, &amp;Helpers.ex_core_1/1},
}


actions = %{
  "Elixir.for"  =&gt; fn {input, elx, _core} -&gt; elx.(input) end,
  "ExCore.comp" =&gt; fn {input, _elx, core} -&gt; core.(input) end,
}


Benchee.run actions, inputs: inputs, time: 5, warmup: 5, print: %{fast_warning: false}
</code></pre>
<p>And the results locally right now:</p>
<pre data-code-wrap="zsh"><code class="lang-zsh">Operating System: Linux
CPU Information: Blah
Number of Available Cores: 6
Available memory: 16.430148 GB
Elixir 1.6.6
Erlang 21.1.1
Benchmark suite executing with the following configuration:
warmup: 5.00 s
time: 5.00 s
parallel: 1
inputs: List - 10000 - into map +1 even *2, List - 10000 - map*2
Estimated total run time: 40.00 s



Benchmarking with input List - 10000 - into map +1 even *2:
Benchmarking Elixir.for...
Benchmarking ExCore.comp...

Benchmarking with input List - 10000 - map*2:
Benchmarking Elixir.for...
Benchmarking ExCore.comp...

##### With input List - 10000 - into map +1 even *2 #####
Name                  ips        average  deviation         median
ExCore.comp        370.81        2.70 ms     ±2.76%        2.67 ms
Elixir.for         245.68        4.07 ms    ±21.72%        3.90 ms

Comparison: 
ExCore.comp        370.81
Elixir.for         245.68 - 1.51x slower

##### With input List - 10000 - map*2 #####
Name                  ips        average  deviation         median
ExCore.comp        2.50 K      399.55 μs     ±9.28%      405.00 μs
Elixir.for         1.92 K      521.94 μs     ±7.26%      535.00 μs

Comparison: 
ExCore.comp        2.50 K
Elixir.for         1.92 K - 1.31x slower

</code></pre>
<p>Interestingly it won’t run on Elixir 1.7.4, get a syntax error, <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> did something change in a backwards incompatible way with Elixir 1.7.4?  o.O</p>
<pre data-code-wrap="zsh"><code class="lang-zsh">╰─➤  mix bench comprehension                                                                                                      1 ↵
** (SyntaxError) bench/comprehension_bench.exs:35: unexpected operator -&gt;. If you want to define multiple clauses, the first expression must use -&gt;. Syntax error before: '-&gt;'
    (elixir) lib/code.ex:767: Code.require_file/2
    (mix) lib/mix/tasks/run.ex:146: Mix.Tasks.Run.run/5
    (mix) lib/mix/tasks/run.ex:85: Mix.Tasks.Run.run/1
    (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
    (mix) lib/mix/task.ex:355: Mix.Task.run_alias/3
    (mix) lib/mix/task.ex:279: Mix.Task.run/2
</code></pre>
<p>I notated line 35 as <code># line 35</code> in the above benchmark source.  Feel free to clone <code>git clone https://github.com/OvermindDL1/ex_core.git &amp;&amp; mix deps.get &amp;&amp; mix compile &amp;&amp; mix bench comprehension</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="103832" 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/77">Post #76</a>
	                </div>
	            </div>
              <div id="likers-container-103832" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103832"
                     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 #76"></div>
  </section>
</div>
    <div class="postbit" id="103837" data-post-id="103837">
  <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">
								<p>Backwards incompatibility thread opened at:  <a href="https://forum.elixirforum.com/t/elixir-1-7-4-backwards-incompatibility/17917/1" class="inline-onebox" rel="nofollow">Elixir 1.7.4 backwards incompatibility</a></p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Seems awesome. I would only like to know how it behaves when you also want to filter some entries like you can do with <code>for</code>, ex.: <code>for a &lt;- 1..10, mod(a, 2) == 0, do: a * a</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="103838" 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/79">Post #78</a>
	                </div>
	            </div>
              <div id="likers-container-103838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103838"
                     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 #78"></div>
  </section>
</div>
    <div class="postbit" id="103840" data-post-id="103840">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I would be nice to get rid of that feeling I get using other languages and platforms that “this would be better in Elixir.” <img src="https://forum.elixirforum.com/images/emoji/apple/joy.png?v=15" title=":joy:" class="emoji" alt=":joy:" 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="103840" 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/80">Post #79</a>
	                </div>
	            </div>
              <div id="likers-container-103840" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="103840"
                     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 #79"></div>
  </section>
</div>
    <div class="postbit" id="103862" data-post-id="103862">
  <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="hauleth" data-post="79" 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/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>Seems awesome. I would only like to know how it behaves when you also want to filter some entries like you can do with <code>for</code> , ex.: <code>for a &lt;- 1..10, mod(a, 2) == 0, do: a * a</code> .</p>
</blockquote>
</aside>
<p>With <code>comp</code> it was going to be just a matcher name like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">comp do
  x &lt;- list l
  x &lt;- filter mod(x, 2) == 0 # Only evens
  x * 2 # Double the evens
end
</code></pre>
<p>The ‘type’ definition was the code generation command, so <code>list</code> generated optimal code for list iteration, <code>filter</code> would generate optimal code for running the test, etc… etc…  I was considering if to make it user extensible as well for custom types that could get around needing to incur the ‘Access’ cost for generic enumerations.</p> 
	            </div>

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