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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had to create an account here just to say how much I love this. This is incredibly exciting!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293344" data-batch-url="/posts/batch_likers">
                        21
                      </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/type-system-updates-moving-from-research-into-development/56827/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-293344" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293344"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just want to add to the chorus here, I am very excited by this.</p>
<p>As someone fairly new to the Elixir community, is there any way for me to contribute to this work? I have limited free time, but I’d love to help out with whatever I can.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293354" 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/type-system-updates-moving-from-research-into-development/56827/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-293354" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293354"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="cevado" data-post="10" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cevado/48/40655_2.png" class="avatar"> cevado:</div>
<blockquote>
<p>is there any information if the new type system will support literals as types?</p>
</blockquote>
</aside>
<p>The type system allows us to support any literal as type but it is still undecided if we want to do that. Opposite to the Dialyzer, an actual type system will be strict about the expected arguments. Imagine this code:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ :foo or :bar -&gt; string
def foo_or_bar(:foo), do: ...
def foo_or_bar(:bar), do: ...
</code></pre>
<p>Now imagine you call it like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">foo_or_bar(String.to_existing_atom(string))
</code></pre>
<p>Because you are passing <em>any</em> atom to the function, the type system will warn about a type error. While Dialyzer would never warn. So you would need to write this instead:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">case String.to_existing_atom(string) do
  :foo -&gt; foo_or_bar(:foo)
  :bar -&gt; foo_or_bar(:bar)
  _ -&gt; raise "expected foo or bar"
end
</code></pre>
<p>Therefore, more specific types will require you to prove that you are passing those specific types and that may actually make the type system more annoying than helpful.</p>
<p>Since there are trade-offs here, it is a decision we will make later once we have a better feeling for the type system.</p>
<aside class="quote no-group" data-username="sergio" data-post="13" data-topic="56827" 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/sergio/48/26966_2.png" class="avatar"> sergio:</div>
<blockquote>
<p>Does this mean that the type system you’re exploring will ultimately replace typespecs entirely?</p>
</blockquote>
</aside>
<p>Correct.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293355" data-batch-url="/posts/batch_likers">
                        21
                      </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/type-system-updates-moving-from-research-into-development/56827/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-293355" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293355"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I foresee the problem where code will need to be annotated with both (at least for a while). And where people would be loathe to convert their typespecs to the new syntax.</p>
<p>While there are no user-facing changes yet, this is something to consider.</p>
<hr>
<p>Another minor, personal gripe I’ve always had with typespecs: they are outside the function, and you need to update code in two places when you changed something. I’d love for the specs to be inline, but then no idea how to deal with functions with multiple definitions <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293356" 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/type-system-updates-moving-from-research-into-development/56827/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-293356" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293356"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="293358" data-post-id="293358">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dmitriid" data-post="18" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmitriid/48/13182_2.png" class="avatar"> dmitriid:</div>
<blockquote>
<p>I foresee the problem where code will need to be annotated with both (at least for a while). And where people would be loathe to convert their typespecs to the new syntax.</p>
</blockquote>
</aside>
<p>I am afraid there isn’t much we can do. Using typespecs for the type system will definitely be harmful in the long term, as types won’t be as precise as they could be. Our suggestion will be to <em>rewrite</em> the typespecs as you convert, especially because they are not used to drive Dialyzer’s inference (their benefit comes from documentation/specification, which you will get from the new type system as well).</p>
<aside class="quote no-group" data-username="dmitriid" data-post="18" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmitriid/48/13182_2.png" class="avatar"> dmitriid:</div>
<blockquote>
<p>Another minor, personal gripe I’ve always had with typespecs: they are outside the function, and you need to update code in two places when you changed something. I’d love for the specs to be inline, but then no idea how to deal with functions with multiple definitions</p>
</blockquote>
</aside>
<p>I actually think this is harmful as it couples the types with the implementation and you can accidentally change the signature as you refactor a function from one ↔ many clauses. Also, we already have pattern matching and default arguments in signatures. Adding type declarations to the mix will allow our function signatures to become really really large and somewhat unreadable.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293358" data-batch-url="/posts/batch_likers">
                        13
                      </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/type-system-updates-moving-from-research-into-development/56827/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-293358" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293358"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve been wondering how you were going to approach this. I don’t think it’s just a problem with literals, though. This pattern where we restrict the input with a pattern match and pass in values that cannot be proven to be correct seems very common. And if an invalid value gets passed due to a bug, that seems to work well with the “let it crash” approach.</p>
<p>I’m not sure if there’s a way to make these two approaches work together. Maybe it would require changing the call site to say “Trust me, this value will be valid” and then the type checker would basically fall back to the optimistic Dialyzer style where it would only check that it is possible for the value to be valid.</p>
<p>Anyway, I’m sure you’ve spent much more time thinking about this, so I’m pretty excited about whatever you end up doing <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293359" 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/type-system-updates-moving-from-research-into-development/56827/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-293359" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293359"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="17" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>Because you are passing <em>any</em> atom to the function, the type system will warn about a type error. While Dialyzer would never warn.</p>
</blockquote>
</aside>
<p>Would it be a warning that can be ignored or an error?<br>
I like the idea of using types as documentation, but it’s extremely annoying to document functions that expect a map with specific string keys.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="17" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>Therefore, more specific types will require you to prove that you are passing those specific types and that may actually make the type system more annoying than helpful.</p>
</blockquote>
</aside>
<p>Could it be parametrized? I know it’s difficult to take that decision now, but just as the formatter, some stuff initially was not supported but in later versions more configuration was added to the process. maybe something that we can set as compiler options in mix.exs <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293360" 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/type-system-updates-moving-from-research-into-development/56827/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-293360" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293360"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Sorc96" data-post="20" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorc96/48/28361_2.png" class="avatar"> Sorc96:</div>
<blockquote>
<p>I’ve been wondering how you were going to approach this. I don’t think it’s just a problem with literals, though. This pattern where we restrict the input with a pattern match and pass in values that cannot be proven to be correct seems very common.</p>
</blockquote>
</aside>
<p>You are correct. My worry (which may or may not be unfounded) is that literals would accentuate the problem and require additional functions. For example, if we break integers into <code>pos_integer or zero or neg_integer</code>, we may need to add convenience functions such as <code>String.to_positive_integer</code> to make sure we propagate more type information. With atoms, that’s a smaller concern, because dynamic creation of atoms is more uncommon.</p>
<p>Something else to decide, as you described, is what happens when you, on purpose, want to ignore a return type of a function. <code>:ok = some_fun()</code> where <code>some_fun()</code> also returns <code>{:error, _}</code>. Is that a type error or not? What about <code>case some_fun() do</code> but you match only on some of the possible return types?</p>
<p>We could ignore by default, but then it means that if you matched on all results of <code>some_fun()</code> and then <code>some_fun()</code> adds a new return type, a type error could leak through the system. In this scenario, we may need to introduce functions such as <code>case!</code> which means: “we may raise at runtime for unmatched clauses because we are not forcing you to check them all”.</p>
<p>So we talked a lot about those cases and part of the adoption challenge will be in figuring out how frequently those happen and what mechanisms we will have around them.</p>
<aside class="quote no-group" data-username="cevado" data-post="21" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cevado/48/40655_2.png" class="avatar"> cevado:</div>
<blockquote>
<p>Would it be a warning that can be ignored or an error?</p>
</blockquote>
</aside>
<p>A warning but most likely non-ignorable.</p>
<aside class="quote no-group" data-username="cevado" data-post="21" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cevado/48/40655_2.png" class="avatar"> cevado:</div>
<blockquote>
<p>I like the idea of using types as documentation, but it’s extremely annoying to document functions that expect a map with specific string keys.</p>
</blockquote>
</aside>
<p>It may be that you will need to cast your string keys into atom keys and then rely on atom keys through the system. This is pretty much similar to all other typed languages: you need to cast the data into your types as it enters the system.</p>
<p>It is too early too say but we most likely won’t add any sort of configuration around this, otherwise will generate incompatibility between projects (some will be more precise than others and that can be a recipe for disaster).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293361" data-batch-url="/posts/batch_likers">
                        13
                      </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/type-system-updates-moving-from-research-into-development/56827/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-293361" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293361"
                     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="293365" data-post-id="293365">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="22" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>It may be that you will need to cast your string keys into atom keys and then rely on atom keys through the system. This is pretty much similar to all other typed languages: you need to cast the data into your types as it enters the system.</p>
</blockquote>
</aside>
<p>I don’t like this approach of casting data too early in the system, at least in my experience it drive to unnecessarily rigid systems.<br>
I was expecting to be able to express something like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ %{"foo" =&gt; string, "bar" =&gt; integer} -&gt; success()
$ map -&gt; error()
</code></pre>
<p>So i could be strict on success and loose on failures. <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293365" 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/type-system-updates-moving-from-research-into-development/56827/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-293365" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293365"
                     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="293366" data-post-id="293366">
  <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">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="17" data-topic="56827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>Therefore, more specific types will require you to prove that you are passing those specific types and that may actually make the type system more annoying than helpful.</p>
</blockquote>
</aside>
<p>We already have Dialyzer and it’s more lax, no need to duplicate that behaviour IMO.</p>
<p>Let’s have the new type system be more strict. It would also be a good step towards exhaustive pattern matching. Whoever does not want “annoyance” will simply not use the new system.</p>
<p>Though if it will replace the current type specs then I see your point.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293366" data-batch-url="/posts/batch_likers">
                        10
                      </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/type-system-updates-moving-from-research-into-development/56827/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-293366" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293366"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/56827/load_more?page=3">Load more posts (144 remaining)</a>
</div></template></turbo-stream>