<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="293416" data-post-id="293416">
  <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="Sorc96" data-post="44" 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>This reminds me of a thought I had some time ago. Since bang functions are pretty much always implemented the same way, how awesome would it be if <code>!</code> was a macro, so that you could use it with any function and nobody would ever need to explicitly implement a bang version of a function again? It would basically be like an option unwrap function, but in one character. But that’s definitely a topic for another discussion.</p>
</blockquote>
</aside>
<p>Off topic, yes, but that <em>would</em> be very nice.  I’ve been in the weeds of <a href="https://hexdocs.pm/image" rel="noopener nofollow ugc"><code>Image</code></a> and, to a lesser extent, <a href="https://hexdocs.pm/vix" rel="noopener nofollow ugc"><code>Vix</code></a> lately where ~99% of all public functions have a bang version.</p>
<p>And yes, fair enough, I wasn’t thinking about other cases of matching when a bang version doesn’t exist—I have indeed seen a lot of <code>:ok = thing()</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293416" 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/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-293416" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293416"
                     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 #45"></div>
  </section>
</div>
    <div class="postbit" id="293417" data-post-id="293417">
  <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">
								<p>On the topic of typed languages, it seems that third party cookies are doing their wonders, as I stumbled upon this talk today:</p><div class="youtube-onebox lazy-video-container" data-video-id="Tml94je2edk" data-video-title="Why Static Typing Came Back • Richard Feldman • GOTO 2022" data-video-start-time="" data-provider-name="youtube">
  <a href="https://www.youtube.com/watch?v=Tml94je2edk" target="_blank" class="video-thumbnail" rel="noopener nofollow ugc">
    <img class="youtube-thumbnail" src="https://img.youtube.com/vi/Tml94je2edk/maxresdefault.jpg" title="Why Static Typing Came Back • Richard Feldman • GOTO 2022" width="690" height="388">
  </a>
</div>

<p>If you have time to watch it I recommend it, as it is a very well structured and interesting talk. If not, this guy is the creator of <a href="https://www.roc-lang.org/" rel="noopener nofollow ugc">https://www.roc-lang.org/</a>, quite a interesting language that employs a strategy close to dialyzer, but this is done by the 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="293417" 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/type-system-updates-moving-from-research-into-development/56827/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-293417" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293417"
                     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 #46"></div>
  </section>
</div>
    <div class="postbit" id="293436" data-post-id="293436">
  <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="zachallaun" data-post="45" 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/zachallaun/48/29208_2.png" class="avatar"> zachallaun:</div>
<blockquote>
<p>José, do you know whether the initial development work for this will be “in the open,” or do y’all plan to keep development private until some internal milestone is reached?</p>
</blockquote>
</aside>
<p>Our goal is to open it as soon as possible. I think the initial Elixir implementation will be closed, so we iron out the basic foundation, and then move it to Elixir and keep it open.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293436" data-batch-url="/posts/batch_likers">
                        7
                      </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/48">Post #47</a>
	                </div>
	            </div>
              <div id="likers-container-293436" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293436"
                     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 #47"></div>
  </section>
</div>
    <div class="postbit" id="293447" data-post-id="293447">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="dimitarvp" data-post="25" 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/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<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>how frequently those happen and what mechanisms we will have around them</p>
</blockquote>
</aside>
<p>Non-exhaustive pattern matching is a fact of life in code bases that make money. I’ve been in several teams where the policy was “just match on these three patterns and if we get an error in our monitoring system then we’ll add more”. Can’t say how often that happens but Elixir being lax on this until an actual crash happens is something people definitely are making use of.</p>
</blockquote>
</aside>
<p>This is one of the core tensions in the value proposition of an exhaustive type system for Elixir, TBH. Best-in-class pattern matching + best-in-class resiliency lets me choose my own “error kernel”—boundaries to contain cascading errors—and non-exhaustively pattern match within it with concise confidence.</p>
<p>I would love something like <code>case!</code> when I <em><strong>want</strong></em> that exhaustion, and it’d pair well with success-typing dialyzer-style stuff to make sure that all my explicit calls to functions and exhaustive branching alike can pattern match. I do feel like people who want exhaustiveness all the time, everywhere like TS/Elm are programming around some of the strengths of the language, 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="293447" 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/49">Post #48</a>
	                </div>
	            </div>
              <div id="likers-container-293447" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293447"
                     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 #48"></div>
  </section>
</div>
    <div class="postbit" id="293453" data-post-id="293453">
  <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>Well, I still think <code>case!</code> can be replaced with a compiler switch or <code>mix</code> config option. Though that means that gradual upgrading of code will be not possible. It has to be an all or nothing. I can see the conundrum, yep, but still can’t see it as bad; as me and others have pointed out, having stronger guarantees in your code is a feature desired by many.</p>
<p>I wouldn’t want a splintered community and I am fearful that either option has the potential to lead to that outcome. <img src="https://forum.elixirforum.com/images/emoji/apple/confused.png?v=15" title=":confused:" class="emoji" alt=":confused:" loading="lazy" width="20" height="20"></p>
<p>I suppose the highest priority should be “can we guarantee a smooth transition?”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293453" 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/type-system-updates-moving-from-research-into-development/56827/50">Post #49</a>
	                </div>
	            </div>
              <div id="likers-container-293453" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293453"
                     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 #49"></div>
  </section>
</div>
    <div class="postbit" id="293457" data-post-id="293457">
  <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="dimitarvp" data-post="50" 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/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>I wouldn’t want a splintered community and I am fearful that either option has the potential to lead to that outcome. <img src="https://forum.elixirforum.com/images/emoji/apple/confused.png?v=15" title=":confused:" class="emoji" alt=":confused:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>I certainly agree that this should be avoided.  I love how concise the core language is and I really appreciate the core team standing their ground against high pressure situations to add new features and syntax.</p>
<aside class="quote no-group" data-username="christhekeele" data-post="49" 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/christhekeele/48/1039_2.png" class="avatar"> christhekeele:</div>
<blockquote>
<p>non-exhaustively pattern match within it with concise confidence.</p>
</blockquote>
</aside>
<p>I really like like how you put that as it’s how I was feeling the other day when I came across it.  It’s a very-low stakes scenario but <code>case!</code> would let me say, “Hey, I mean to do this!”  Of course, I could also have a catch-all that raises which would be fine if not a little inelegant.  Furthermore, <code>case!</code> could lead to confusion and, as <a class="mention" href="/u/dimitarvp" rel="nofollow">@dimitarvp</a> mentioned, having teams that ban its use since no one can agree if it was being used it on purpose or not.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293457" 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/51">Post #50</a>
	                </div>
	            </div>
              <div id="likers-container-293457" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293457"
                     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 #50"></div>
  </section>
</div>
    <div class="postbit" id="293458" data-post-id="293458">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="woylie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/120/38856_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  woylie
                  </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="50" 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/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Well, I still think <code>case!</code> can be replaced with a compiler switch or <code>mix</code> config option.</p>
</blockquote>
</aside>
<p>Whether I’d want exhaustive pattern matching or not depends on the context within the application.</p>
<p>For example, if I have a certain struct/schema that has a <code>type</code> field, and somewhere I want to do something based on the type of an instance, I would very much like to get a warning if I didn’t consider a newly added type.</p>
<p>However, there are situations where certain values should not occur in the current context. If I get them anyway, that would be unexpected and indicate a flaw in my application logic somewhere else. Consider a UI element that should only be rendered if the current user is authorized to use it. It should be impossible for the events triggered by this element to occur if the user is unauthorized. The context functions called by the event handler would still check whether the current user is authorized (and return something like <code>{:error, :unauthorized}</code>, but the event handler function itself could assume that the current user is authorized and wouldn’t need to match on that particular error. I would like to get a runtime pattern match error in this case, because it would indicate that I either forgot to add the authorization check in the template, or I used the wrong policy, etc.</p>
<p>I don’t know whether these are good examples, but if I look through the applications I’m working on, I’m sure I will find plenty places where I would prefer exhaustive pattern matching and other places where I would prefer non-exhaustive pattern matching. I don’t think a compiler switch would be sufficient then.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="christhekeele" data-post="49" 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/christhekeele/48/1039_2.png" class="avatar"> christhekeele:</div>
<blockquote>
<p>and non-exhaustively pattern match within it with concise confidence.</p>
</blockquote>
</aside>
<p>As other mentioned above, I also consider non-exhaustive pattern-matching a feature rather than a bug, since it behaves just like guards and help write concise <a href="https://dashbit.co/blog/writing-assertive-code-with-elixir" rel="noopener nofollow ugc">assertive code</a> in some cases, just like <code>=</code>. For example: it’s either a map with a <code>name</code> string key, or <code>nil</code>, everything else is unexpected and we could just LetItCrash™. Else, you would need to add a pokemon clause (catch them all) and manually throw something equivalent to a <code>MatchError</code>, which is done out of the box.</p>
<p>Exhaustive pattern-matching would also be a very useful feature in other cases when we don’t want this, so I can see the case (no pun intended) for having both <code>case!</code> and <code>case</code>. The issue I’m seeing is that <code>case</code> would be the assertive version than raises on runtime, and <code>case!</code> would handle all cases and not raise (except at compile time).</p>
<p>Also, we will have the same issue for <code>def</code> ( <code>def!</code>?), since exhaustive pattern-matching would probably also be expected here.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I guess the general description of the second example is that sometimes you can rule out certain return values of a function because they only occur under conditions that you already know will not be met in the given context.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293462" 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/type-system-updates-moving-from-research-into-development/56827/54">Post #53</a>
	                </div>
	            </div>
              <div id="likers-container-293462" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293462"
                     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 #53"></div>
  </section>
</div>
    <div class="postbit" id="293463" data-post-id="293463">
  <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>My scenario was an incredibly simple one:  I have a whole mess of checkboxes with <code>phx-click</code>s on them.  They post with a value of <code>"true"</code> or <code>"false"</code>.  At first I was going to cast it to a boolean and use an <code>if</code>/<code>else</code> but then I thought about how the only way it could ever not one of those two strings is if someone is messing with my app.  If I cast I would probably be non-the-wiser and, even if it’s not a big deal, it felt right to <code>case</code> on those two values alone so it otherwise crashes.  I thought of adding a catch-all that raises but <a class="mention" href="/u/sabiwara" rel="nofollow">@sabiwara</a> put into better words than I could about my reservations for doing so.</p>
<p>Anyway, not to keep beating this <code>case!</code> horse but I’d never thought too much about this before and enjoying the insights.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="293463" 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/55">Post #54</a>
	                </div>
	            </div>
              <div id="likers-container-293463" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="293463"
                     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 #54"></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=6">Load more posts (114 remaining)</a>
</div></template></turbo-stream>