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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hst337" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hst337
                    <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="D4no0" data-post="11" data-topic="54854">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/d4no0/48/33624_2.png" class="avatar"> D4no0:</div>
<blockquote>
<p>This seems to be a big overstatement</p>
</blockquote>
</aside>
<p>I don’t know if it is an overstatement or not but several companies have already switched from Elixir because of lack of static typing. In the video you’ve linked above, Jose states that it is an elephant in the room (important topic in other words) and dashbitco has already been paid to implement type checking in the compiler (and that’s why it is present there).</p>
<p>So, <strong>language is already moving towards compile time type inference</strong>, there are research groups working in set-theoretic type inference analysis, there is me, there is facebook with eqwalizer, etc. And I think that setting up language and compiler specification process is a good step in this direction, which would make a process of compiler development more coordinated and define the compatibility boundaries of compilers and runtime capabilities.</p>
<hr>
<aside class="quote no-group" data-username="D4no0" data-post="11" data-topic="54854">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/d4no0/48/33624_2.png" class="avatar"> D4no0:</div>
<blockquote>
<p>conclusion of that talk is that having static types that are solved at compile-time don’t solve much</p>
</blockquote>
</aside>
<p>That’s not the conclusion. And even if this is the conclusion, I can argue about points like “static typing won’t improve performance”, because I already have an existing compiler which is capable to perform compile time optimizations based on very-very-very basic type inference in Enum pipelines, and I have drafts of compile-time protocol resolution.</p>
<p>The problem is that, while these optimizations are compatible with reference compiler in 99.999999999% of cases and really useful, some non-obvious use cases will be broken (like using <code>Patch</code> library to check if function was called). So specification is required to define what is a reliable behavior and what is not and may vary from version to version, or from compiler to compiler</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283192" 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/compiler-and-language-specification/54854/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-283192" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283192"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="283206" data-post-id="283206">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="hst337" data-post="12" data-topic="54854">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/h/41988e/48.png" class="avatar"> hst337:</div>
<blockquote>
<p>I don’t know if it is an overstatement or not but several companies have already switched from Elixir because of lack of static typing</p>
</blockquote>
</aside>
<p>Or maybe because their engineers are incapable, who knows. There are a lot of stories like these about other languages and frameworks too and none of them are technically based.</p>
<aside class="quote no-group" data-username="hst337" data-post="12" data-topic="54854">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/h/41988e/48.png" class="avatar"> hst337:</div>
<blockquote>
<p>So, <strong>language is already moving towards compile time type inference</strong>, there are research groups working in set-theoretic type inference analysis, there is me, there is facebook with eqwalizer, etc.</p>
</blockquote>
</aside>
<p>This is a great thing, however there is a big difference between having inference and static typing at compile-time, and I would go with the first as it gives a lot more freedom and this is kind of the point that talk was having.</p>
<aside class="quote no-group" data-username="hst337" data-post="12" data-topic="54854">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/h/41988e/48.png" class="avatar"> hst337:</div>
<blockquote>
<p>That’s not the conclusion. And even if this is the conclusion, I can argue about points like “static typing won’t improve performance”, because I already have an existing compiler which is capable to perform compile time optimizations based on very-very-very basic type inference in Enum pipelines, and I have drafts of compile-time protocol resolution.</p>
</blockquote>
</aside>
<p>I never talked about performance, if let’s say you improve the performance of the code by 20% but at the same increase the complexity of tooling and development, I will instantly drop that optimization, as performance nowadays is overrated and not the deciding factor in a lot of cases.</p>
<p>My hat down to you if you want to improve this area, as this is one of the most complex one that only few can tackle with.</p>
<p>My opinion is that you will invest a lot of effort into this and have little to no gain, after all the practical aspects of the language are the most important ones (development/refactor speed, how happy you are writing code in the language, the libraries and tooling around them).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283206" 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/compiler-and-language-specification/54854/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-283206" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283206"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="283221" data-post-id="283221">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hst337" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hst337
                    <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">
								<p>I appreciate your opinion, but things you’re talking about are arguable and completely irrelevant to the topic of this thread. If you want to have a discussion about usefulness of optimizing compilers and how static typing is not a question of being capable or not, but really a question of applicability of static typing as a tool to solve problems, we can create a separate thread or continue in private messages.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283221" 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/compiler-and-language-specification/54854/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-283221" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283221"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>There is a half-finished <a href="https://github.com/erlang/spec" rel="noopener nofollow ugc">Erlang Language Specification</a> that anyone who has the time could start to contribute to. As stated in this thread, Erlang is the basis of Elixir, so if you have a spec for Erlang much of what Elixir is would already be defined in the Erlang spec.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283394" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiler-and-language-specification/54854/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-283394" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283394"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="283400" data-post-id="283400">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hst337" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hst337
                    <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">
								<p>Thanks for the link to erlang spec, but the purpose of this topic is discussion about Elixir compiler and runtime specification. While Elixir is built on top of Erlang, there are important for compiler developers things that are not covered and can’t be covered by Erlang spec. This includes, for example module compilation order, or inter-module dependency tracking, or possibility of compile-time evaluation of some runtime code etc.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283400" 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/compiler-and-language-specification/54854/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-283400" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283400"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>