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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="eksperimental" data-post="20" data-topic="37744" 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/eksperimental/48/1401_2.png" class="avatar"> eksperimental:</div>
<blockquote>
<aside class="quote no-group" data-username="corka149" data-post="19" data-topic="37744" 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/corka149/48/16931_2.png" class="avatar"> corka149:</div>
<blockquote>
<p>Pattern matching in function signatures - i love it. Since i know this feature, every other language feels limited.</p>
</blockquote>
</aside>
<p>Key distinctive feature in Elixir/Erlang.</p>
</blockquote>
</aside>
<p>I’m still not decided on how much I love it, but I have noticed that when I go back to try and write some code in Elm or Rust that I have to reorganize how I think about defining functions for various situations, usually by wrapping the arg in some Enum (Rust) or custom type (Elm) and then using a match or case statement in the body of the function. If I start to get nested matches I really start to appreciate the Elixir pattern. Even though the nested matches are probably a sign that I’m poorly designing my project to start with I can appreciate that Elixir provides a way to keep that code clean.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204580" 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/what-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-204580" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204580"
                     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="204592" data-post-id="204592">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The thing to me, specifically about pattern matching during function overloading is that it really gives both elixir/erlang it’s own feel.</p>
<p>When I first started learning Erlang I was like “okay, where’s the currying here? why aren’t we doing partial application” as I was coming hot off a tour of duty with OCaml and then it took me about a year to realize that I was reaching for a tool that didn’t need to exist in Erlang (and ultimately Elixir), because it’s just organized in a different way.</p>
<p>I think the thing for me that feels most useful is that you’re clearly defining the boundaries in the function signature, trading explicitness for composability. Granted it’s absolutely a scale on both of those, but Ex/Erl tends to favor the former vs the latter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204592" 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/what-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-204592" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204592"
                     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="204593" data-post-id="204593">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>excuse the stupid question, but how does pattern matching in function signatures replace partial application?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204593" 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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-204593" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204593"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="204595" data-post-id="204595">
  <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="eksperimental" data-post="13" data-topic="37744">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eksperimental/48/1401_2.png" class="avatar"> eksperimental:</div>
<blockquote>
<p>Actually the initial Mix implementation is inspired by Leiningen</p>
</blockquote>
</aside>
<p>I am fully aware of that. Same goes for Rebar3 AFAIK.</p>
<aside class="quote group-Membrane-Core-Team" data-username="mat-hek" data-post="18" data-topic="37744" 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/mat-hek/48/38168_2.png" class="avatar"> mat-hek:</div>
<blockquote>
<p>It’s been a couple of years, but SBT felt way worse than mix for me. At least it’s definitely not a <em>Simple</em> Build Tool <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>
</blockquote>
</aside>
<p>I never said that it is like Mix, I just said that a lot of languages try to have unified build and dependency management tools, as these have proven their usefulness for the developers (and became bane of the OS package repository maintainers).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204595" 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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-204595" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204595"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m just thinking when I write OCaml code, the pattern matching exists as the body of the method, not the signature, when we do pattern matching especially with doing partial application in Ex/Erl, it can live in the signature, which allows us to provide iteratables as well that are specific to the information at hand, even though Ex/Erl doesn’t really <em>do</em> partial application. I mean, sorta.</p>
<p>Because y’know (oh god this is gonna be bad bc my brain is broke right now)</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def something({:ok, file_type: "json", whatever}), do: fn (x) -&gt; whatever(x) |&gt; JSON.something; end
def something({:ok, file_type: "xml", whatever}), do: fn (x) -&gt; whatever(x) |&gt; to_charlist() |&gt; :xmerl_scan.something; 
end
</code></pre>
<p>gives us the ability to apply the function as part of the condition, where x might be a file? some sort of data here. Lazy operating? maybe Instead of doing the conditional inline like</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">(* i'm not gonna plug this in and figure the type *)
let something file_type whatever =
  match file_type with
    "json" -&gt; whatever |&gt; Yojson.something
    "xml" -&gt; whatever |&gt; xml.something 
;;
</code></pre>
<p>You can see that in some like Enum-ish related concepts a lot more that deal with polymorphic types more than anything else.</p>
<p>But it’s not that it replaces necessarily, it just moves the responsibility into the forefront. That was probably the biggest difference for me was that you’re improving clarity by adding relevant data to the method signature instead of putting it in the body.</p>
<p>It’s a code readability thing more than a “it replaces”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204599" 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/what-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-204599" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204599"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="APB9785" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/APB9785/120/24101_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  APB9785
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of ECSx</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>All types of pattern matching, but especially in function definitions.<br>
Also the pipe operator.<br>
Two things I hate not having when I have to use another language.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204600" 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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-204600" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204600"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>My favourite Elixir features are pattern matching, macros, and tooling (Mix, IEx, ExDoc, etc). I like to share this article: <a href="https://howistart.org/posts/elixir/1/" class="inline-onebox" rel="noopener nofollow ugc">Elixir · How I Start.</a> as it shows some language basics but more importantly supervision trees and <strong>distribution</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="204601" data-batch-url="/posts/batch_likers">
                        6
                      </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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-204601" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204601"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Same, this made me organize my Rust code by making smaller functions covering part of the <code>case</code> arms. Since Rust can’t do pattern matching in the function heads I end up making those functions with different names – which I’m not sure yet it it’s a good pattern or not.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204611" 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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-204611" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204611"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s why I end up wrapping args in Enum variants.</p>
<pre data-code-wrap="rust"><code class="lang-rust">enum Bar {
    BarString(String),
    BarNum(i32)
}

fn foo(bar: Bar) -&gt; Result&lt;i32, std::num::ParseIntError&gt; {
    match bar {
      Bar::BarString(x) =&gt; x.parse(),
      Bar::BarNum(y) =&gt; Ok(y)
    }
}
</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="204613" 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-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-204613" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204613"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yep, me too, although more often than not I just make functions that describe a part of the logic chain with their suffix.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204620" 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/what-feature-would-you-like-to-recommend-if-you-share-elixir-to-a-newbie/37744/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-204620" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204620"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</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/37744/load_more?page=4">Load more posts (8 remaining)</a>
</div></template></turbo-stream>