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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Typespecs allow literal integers actually. Literal strings would be interesting but I think the usefulness would be substantially diminished vs. e.g. TypeScript because we mostly use atoms where they use strings for options and such. What other literals would you want?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367260" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-367260" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367260"
                     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="367261" data-post-id="367261">
  <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">
								<p>mainly strings, mostly because i dont like this pattern of enforcing atom keys on everything. I usually set atom keys on data that is built in the code, not the ones that are transformed in the code. I think it makes it easy to deal with external data and schemaless jsonb fields in the db.</p>
<p>TIL that typespecs allow literal integers. I guess the moment I had issues with string literals I stopped trying to use them and added the context that I needed into docstrings(also other thing that would be good is to allow private functions to have docstrings and hexdocs just ignores them when building the docs, it’s better than writing commentaries).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367261" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-367261" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367261"
                     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="367264" data-post-id="367264">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The thing is, when you have string keys it’s generally because they are “un-parsed” structures, i.e. JSON that you got from wherever and haven’t validated. So, at that point, the structures <em>aren’t typed yet</em>. A type system won’t do anything there.</p>
<p>When you <em>do</em> validate the JSON, you are by definition conforming its keys to a known set. And at that point it’s okay to turn them into atoms and use them in types. This is what happens when you cast in Ecto, for example.</p>
<p>I suppose you could make a point that you want to validate the structure but then keep the string keys, but when working with structured data I really prefer to have <em>structs</em> with the <code>data.field</code> syntax and guaranteed keys, so idk.</p>
<aside class="quote no-group" data-username="cevado" data-post="13" data-topic="71280">
<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>TIL that typespecs allow literal integers</p>
</blockquote>
</aside>
<p>I was also very surprised when I found out lol. I have yet to actually use them, though.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367264" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-367264" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367264"
                     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="367266" data-post-id="367266">
  <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 no-group" data-username="garrison" data-post="14" data-topic="71280">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>I suppose you could make a point that you want to validate the structure but then keep the string keys, but when working with structured data I really prefer to have <em>structs</em> with the <code>data.field</code> syntax and guaranteed keys, so idk.</p>
</blockquote>
</aside>
<p>I don’t like this approach. I’ve worked on systems that derailed pretty bad with a lot of intermediary structs that was terrible to test and terrible to change. I remember one particular case that the same data had 3 different structs that was used just validate/communicate with other systems and check if the data was valid.</p>
<p>I often use schemaless changeset when I need to enforce some some shape/types on data. But when I’m dealing with only reshaping the data to send to another system I prefer to just deal with the shape, I prefer that because the validation and enforcement that I do on my side will be meaningless if the other system rejects 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="367266" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-367266" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367266"
                     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="367267" data-post-id="367267">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was lost by the question, I assumed this was an easy answer that everyone agreed on. But I guess it depends on what type of AI you have envisioned, my model of AI would be something that can spit code out without the need of runtime verification hence static types are necessary. I dont know enough about type theory, but I think you can verify a programs property or parts of it, just off its types &amp; fn types with a strong statically typed language and even more so with a dependently typed language</p>
<p>Now if you envision an AI that has the mcp form factor , inputs into your running system and then updates code while your system is running, fixes any runtime bugs and writes a bunch of test then I can see the argument.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367267" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-367267" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367267"
                     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="367274" data-post-id="367274">
  <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>So again I said this in jest as a jab at “vibe coding.”   When I use that term, I mean it in the extreme sense that it has now come to mean where you <em>only</em> interact with an agent <strong>and you never look at the code it produces</strong>.  This would be in the same way that the vast majority (if not all) of us never look at the machine code our high level languages produce.  And yes, there are a whole bunch of people who belive that that is where we are headed.  In this extreme hypothetical circumstance, how could it possibly matter if code is statically typed or not?  You aren’t looking at it so there’s no advantage there.  If the agent chooses to use types, they could have bugs, but you’d never know (you’d know when you’re program crashes but you wouldn’t know the cause).  More to the point, maybe the LLMs will have gotten so “smart” that they themselves act as the type checker and don’t bother with annotations.</p>
<p>Soooooo ya, it’s a hypothetical that may or may not be a reality sooner or later.  Who knows.  I’m mostly exhausted by all the AI talk and really any kind of tech hype at this point.</p>
<p>Also, I’m mad because my favourite punctuation is the em dash and now Chat Jippity is making me self-conscious and paranoid about using 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="367274" data-batch-url="/posts/batch_likers">
                        5
                      </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/in-an-age-of-ai-is-static-typing-even-necessary/71280/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-367274" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367274"
                     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="367290" data-post-id="367290">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="DaAnalyst" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  DaAnalyst
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think some languages will always require static typing. LLM’s are not omnipotent (actually they are infinitely far from it) and cannot be trusted for tasks that require absolute precision.</p>
<p>On the other hand, some languages do not require any typing whatsoever with or without AI.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367290" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-367290" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367290"
                     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="367300" data-post-id="367300">
  <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">
								<aside class="quote no-group" data-username="DaAnalyst" data-post="18" data-topic="71280">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/278dde/48.png" class="avatar"> DaAnalyst:</div>
<blockquote>
<p>LLM’s are not omnipotent (actually they are infinitely far from it)</p>
</blockquote>
</aside>
<p>Try telling that to the kids in <a href="https://www.reddit.com/r/vibecoding/" rel="noopener nofollow ugc">r/vibecoding</a>.  <em>“Sure maybe not now, but just wait a few months!”</em></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367300" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-367300" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367300"
                     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="367302" data-post-id="367302">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="DaAnalyst" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  DaAnalyst
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p><em>Sure maybe not now, but just wait a few months!</em><br>
<img src="https://forum.elixirforum.com/images/emoji/apple/joy.png?v=15" title=":joy:" class="emoji only-emoji" alt=":joy:" loading="lazy" width="20" height="20"></p>
</blockquote>
<p>Their prospective employers/clients will tell them. Too bad for them they’ll be 5-10 years older than now with no relevant skills. No wonder it’s called “vibecoding” for it sure as hell can’t be called vibeprogramming.</p>
<p>The entire “AI” hype is very reminiscent of the boy bands cult (aka “crypto startups”) from less than ten years ago. Seems it’s been an eternity since given the almost complete loss of collective memory of what the previous greater fool game used to feel like.</p>
<p>In essence, to me this whole thing looks pretty binary: Either we end up inventing AGI (the actual AI) and life will never be the same again, or we end up realizing the smarter autocomplete and cheaper movie production was not really worth all the hype (we’re not yet there with a cheaper movie production, but I dare to assume we will be able to tweak it to consistently fool our senses).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367302" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-367302" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367302"
                     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="367303" data-post-id="367303">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am already seeing that AI agents will produce a solution with a typing violation (in Typescript) and correct themselves on the fly. I am certain when Elixir types land, the same will happen with Elixir.</p>
<p>Imagine you optimize for a new engineer is joining your project and they need to get productive quickly. Whether that new engineer is an AI or a human being will is almost irrelevant. Because it’s a very similar thought process:</p>
<ul>
<li>Documentation helps</li>
<li>Comments help</li>
<li>Consistent project structure help</li>
<li>Being concise is better than being too verbose</li>
<li>Types will reduce the chance they structurally break things</li>
</ul>
<aside class="quote no-group" data-username="sodapopcan" data-post="17" data-topic="71280">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/48/34668_2.png" class="avatar"> sodapopcan:</div>
<blockquote>
<p>how could it possibly matter if code is statically typed or not</p>
</blockquote>
</aside>
<p>I think it might matter because sometimes us humans might still need to pop open the hood to inspect what’s  going on. It might also matter for the AI itself. After all, the AI will need some sort of representation of the code that’s easy for the AI to work with. And i think that higher level representations are probably more efficient.</p>
<p>For arguments sake imagine AIs had to write assembly code instead of JS. It would be a lot harder for even the AI to produce working code. Again the point is that the code representation will still be very important for AIs. Perhaps languages will need to evolve to be easily digestible for humans AND AI, but it seems to me there is a lot overlap.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367303" 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/in-an-age-of-ai-is-static-typing-even-necessary/71280/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-367303" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367303"
                     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>
</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/71280/load_more?page=3">Load more posts (19 remaining)</a>
</div></template></turbo-stream>