<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="206800" data-post-id="206800">
  <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 no-group" data-username="al2o3cr" data-post="11" data-topic="38204">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/48/3457_2.png" class="avatar"> al2o3cr:</div>
<blockquote>
<p>On the flipside: what would “full” static typing bring that Dialyzer doesn’t?</p>
</blockquote>
</aside>
<p>Exhaustive pattern matching. I spent several months in Rust land and now I get anxiety working with Elixir code because it doesn’t have it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206800" 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/typescript-but-for-elixir/38204/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-206800" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206800"
                     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="206823" data-post-id="206823">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="12" data-topic="38204">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Exhaustive pattern matching. I spent several months in Rust land and now I get anxiety working with Elixir code because it doesn’t have it.</p>
</blockquote>
</aside>
<p>(Note, the following is in jest but I still mean it <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"> )</p>
<p>You shouldn’t need to. That is why you are on the beam. It is meant to crash on patterns you don’t care about. It makes the code cleaner to only handle happy path and not litter the code with code that should not happen. <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<p>What do you do when you don’t handle one of 132 error codes from the socket module? Probably a catch all which swallows and logs the error or returns it to someone who has even less knowledge how to handle it. Instead the right thing to do is to let it crash and let the expert supervisors handle it. After all. It is their only job.</p>
<p>If it turns out that clause is part of your domain, then you add it and handle it accordingly.</p>
<p>(Obviously, this is something I would only recommend in beam languages and not to be tried elsewhere (until they have an equally good story on failure handling))</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206823" data-batch-url="/posts/batch_likers">
                        8
                      </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/typescript-but-for-elixir/38204/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-206823" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206823"
                     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="206859" data-post-id="206859">
  <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>Ah, I don’t disagree. It’s just that languages that don’t have the guarantees of the BEAM / OTP are better off being more conservative because f.ex. for a Rust program such an error condition means an irreversible crash – and even if many big-ish projects use Kubernetes where crashed pods gets restarted, I’ve seen those scenarios unfold in practice and it’s not pretty: the app’s availability is severely reduced and logs are filled with the same errors until somebody actually does something about it.</p>
<p>So yet again it’s tradeoffs, right? But I know I wouldn’t mind still having proper sum / algebraic types with exhaustive pattern matching one day. It definitely improves readability of the code even if the benefits of having them in the BEAM are not big otherwise.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206859" 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/typescript-but-for-elixir/38204/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-206859" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206859"
                     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="206878" data-post-id="206878">
  <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>It’s just trading failing at compile time for failing at run time. It should be possible to handle the bad path in Rust in such a way that is efficient at runtime. I love almost everything about Elixir so far, but I do miss the type system of Rust and even Elm.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206878" 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/typescript-but-for-elixir/38204/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-206878" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206878"
                     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="207048" data-post-id="207048">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve never actually worked in a statically typed language before.  At this point, it’s become one of those things where I’m afraid that if I do, I will feel the pain <a class="mention" href="/u/dimitarvp" rel="nofollow">@dimitarvp</a> does which will be annoying because I really like Elixir <img src="https://forum.elixirforum.com/images/emoji/apple/upside_down_face.png?v=15" title=":upside_down_face:" class="emoji" alt=":upside_down_face:" loading="lazy" width="20" height="20">  I am someone who thinks a lot about types and contracts and I make heavy use of the type-hinting features in Elixir.  Would it be nice if my editor could immediately tell me I’m going to have a compile error?  Yep!  But …well, ok, I don’t actually have a retort to that…</p>
<p>If you want to read some good, level-headed championing of dynamic languages (that doesn’t do so by dumping on statically-typed languages), read Sandi Metz’s Practical Object Oriented Design in Ruby.  Ya, it’s an OO book about Ruby, but Sandi Metz is awesome and some of it can apply to functional (in fact a lot of her advice equates to “be more functional”).  She deep-dives into duck typing (mentioned earlier by <a class="mention" href="/u/lostkobrakai" rel="nofollow">@LostKobrakai</a>) which is really nice.  There is also a really good chapter on testing.  Otherwise, the chapters on inheritance, mixins, dependency injection, factory pattern, etc… got me thinking about how ridiculous OO can be—but that’s beside the 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="207048" 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/typescript-but-for-elixir/38204/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-207048" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207048"
                     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="207049" data-post-id="207049">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jononomo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jononomo/120/22121_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jononomo
                    <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 worked in Java for years, so I suppose I’ve had some exposure to a statically typed system.</p>
<p>One downside is that you end up with a lot more boilerplate code and your code is less concise and therefore less fluent from both a reading and a writing point of view.  That was certainly the case in Java.  I haven’t worked in Java for over ten years now, but back in the day you couldn’t even write a hello world program without five lines of boilerplate <code>public static void main...</code> etc.  I really came to hate Java and to dislike programming as a result.</p>
<p>Once I found Python, though, I decided to give programming another job, and that ended up working out well.  Hello world in python is just <code>print "hello world"</code> which I almost couldn’t believe when I first saw it, given that I was coming from a Java world.  Python frankly made a lot of sense to me.</p>
<p>Pretty soon, though, I had to actually figure out JavaScript.  I can’t say that I really understood programming before I really took on a hearty JavaScript project.</p>
<p>Now I’m on to Elixir and honestly, this pure functional approach feels to me like the best yet.  I came to really appreciate the extra security that TypeScript provided for a complex JavaScript project, but the more I think about it the more I think that the concurrency environment of the BEAM and the immutable-data feature of functional programming perhaps more than make up for the any downsides to dynamic typing in Elixir.  I did try doing multi-threaded programming during my Java days and it was one of the biggest headaches of my life.  Just utterly painstaking tedious debugging problems that lasted for days.  Somehow Java’s static types didn’t save me from that.</p>
<p>Back to JavaScript, though – I’m wondering now whether JavaScript may be a special case – although it is the most widely used language in the world, I gather that it is not often praised for it’s design.  Perhaps JavaScript is unique in the degree to which it benefits from a typing layer being added on top.</p>
<p>Incidentally, object-oriented programming made sense to me when it was explained to me in school and it seems to make sense when it is explained in toy situations –  “a dog and a cat are both mammals! So we can inherit…” etc – but in practice when I worked in Java all the types I used seemed like they didn’t relate to anything much in the world and instead had to do with various parts of the Java system – and I came to rely heavily on javadocs integrated into a heavyweight IDE. Now, however, I’m a convert to the functional perspective.  This essay by Steve Yegge really puts a finger on how much I despise Java and how much better I think a functional programming approach is: <a href="http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html" class="inline-onebox" rel="noopener nofollow ugc">Stevey's Blog Rants: Execution in the Kingdom of Nouns</a></p>
<p>With Elixir, I’m honestly surprised that it hasn’t caught on more – the entire system seems like it anticipated the needs of the internet of the 2020s back during the 1990s when it was being applied to telecom switches.  So it seems to me that Elixir+OTP+BEAM ought to be the preferred tech stack from probably 50% or more of tech startups right now and I’m just not sure why it isn’t.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207049" 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/typescript-but-for-elixir/38204/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-207049" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207049"
                     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="207051" data-post-id="207051">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think the way OO is taught in school is a mistake.  The “a dog and a cat are both animals so we can inherit” makes people think that “the thing” about OO is inheritance.  Really, thing about OO is encapsulation of state through the combining of behaviour and data.  I haven’t used inheritance in my OO work in many years.  In my professional life I’ve worked on ecom, procurement, warehouse management, and scheduling systems and none of those have ever lent well to inheritance.  I think it makes sense for something like a video game where you have a lot of characters who all have common characteristics—like health, mana, a walk cycle, etc.  But in an ecom system, I’m not going to have <code>Milk</code>, <code>Bread</code>, <code>Egg</code> that all inherit from <code>Product</code>, I’m just going to have a <code>Product</code> with a <code>name</code>.  As I’ve heard mentioned several times: “Functional excels when you have more behaviour than you have things, and you are mostly adding more behaviour than things—OO excels when you have more things than you have behaviour, and you can mostly adding new things.”</p>
<p>There is a lot to respond to in what you wrote, but my dog is barking for attention <img src="https://forum.elixirforum.com/images/emoji/apple/dog.png?v=15" title=":dog:" class="emoji" alt=":dog:" 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="207051" 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/typescript-but-for-elixir/38204/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-207051" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207051"
                     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="207063" data-post-id="207063">
  <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 no-group" data-username="jononomo" data-post="18" data-topic="38204">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jononomo/48/22121_2.png" class="avatar"> jononomo:</div>
<blockquote>
<p>One downside is that you end up with a lot more boilerplate code and your code is less concise and therefore less fluent from both a reading and a writing point of view.</p>
</blockquote>
</aside>
<p>Main downside for working with Rust for me was the reduced speed of iteration. With Elixir I could literally just go to <code>iex</code> and sketch my idea in a few lines of code. With Rust you have to create a new project, edit the <code>main.rs</code> file and introduce logging library or just directly print to console – or write your functions and then write tests for them. Rust has come a long way and its tooling is absolutely <em>excellent</em>, mind you, so the whole thing still happens very fast.</p>
<p>Rust is encouraging very good practices, no doubt, and it’s making you think twice about stuff – which is very valuable. But sometimes you just want to quickly check if an idea works well or not. In these cases I found Elixir to be a better experience than Rust. But to be fair to both sides, Rust is catching up with frightening speed in every single area – except OTP guarantees.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207063" 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/typescript-but-for-elixir/38204/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-207063" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207063"
                     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="207090" data-post-id="207090">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Comparing the TS+JS with Elixir can be a bit misleading. The main reason TS provides such a benefit in the JS world is two things: the poor tools for on offer structuring code (in Elixir we have modules, processes, apps-as-deps, etc.) and the fact that it is weakly typed. Static typing helps with the weak typing as it helps provides static analysis to do what the runtime really ought to be doing. It’s a (very) imperfect solution, but TS goes a long ways to addressing the weak-typing issues of JS.</p>
<p>Elixir (or, rather, the BEAM) is <em>strongly</em> typed. This is what enables guards such as <code>is_integer</code> and why we get runtime errors when using the wrong sort of data (e.g. passing an integer rather than a string to <code>Integer.parse/2</code>). Static typing allows one to write code that is far more predictable and can defend where needed against odd / bad input.</p>
<p>On the other side, static typing typically means more boilerplate / verbosity and less generic code. But it can also allow for more performant code generation by giving further hints to the compiler, catch bugs that would otherwise slip through … the exhaustive pattern matching of Rust has already been mentioned, and that can be quite useful in some cases.</p>
<p>I think it is instructive, however, that many statically+strongly typed languages are moving more and more to allowing for type inference and generic programming that makes the language look and feel a lot more like a dynamically typed language (C++ an Java both being examples there).</p>
<p>We do have dialyzer and it is pretty decent, particularly for a (mostly) functional language. The function is a good unit of typing for Elixir … buuuut .. it is slow (I suspect this is more an issue of implementation rather than due to any inherent weakness in function annotation), its error reporting can be pretty obtuse at times (though that’s an attribute of many static type systems, particularly older ones), and it doesn’t actually enforce any contracts in code (it is documentary-only .. change the function? you need to also update the <a class="mention" href="/u/spec" rel="nofollow">@spec</a>, not that the code will care and often enough dialyzer won’t tell you about it either ..). So it’s an imperfect system.</p>
<p>I don’t think a whole new language on the BEAM to introduce static typing makes any sense whatsoever, though. Static typing is not nearly a good enough reason to pick a language. It is at best a tie-breaker between ‘equally useful’ options. The amount of highly reliable code being written using Elixir demonstrates that the margins for improvement are not huge.</p>
<p>Personally, I’d love to see a more integrated version of <code>@spec</code> that has better performance characteristics. The type inference dialyzer has is already pretty decent, it’s more about QoL and integration.</p>
<p>Just my 0.02 … <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="207090" 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/typescript-but-for-elixir/38204/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-207090" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207090"
                     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="207268" data-post-id="207268">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t often need super complex typing in elixir, but on occasion I find myself writing something complex enough that a type system could really aid.  It would be cool if I could just put a different extension on the file like <code>.gl</code> and have mix just compile the file with gleam.  It all compiles to beam and so it should all work, right?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207268" 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/typescript-but-for-elixir/38204/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-207268" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207268"
                     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>
</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/38204/load_more?page=3">Load more posts (3 remaining)</a>
</div></template></turbo-stream>