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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, I didn’t mean inline annotations vs not.</p>
<p>In that example of “typespecs can’t negate, only union”… can TypeScript do that? If not, what’s the big benefit to 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="294067" 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/96">Post #95</a>
	                </div>
	            </div>
              <div id="likers-container-294067" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="294067"
                     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 #95"></div>
  </section>
</div>
    <div class="postbit" id="294068" data-post-id="294068">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benwilson512" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benwilson512/120/1457_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benwilson512
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Craft GraphQL APIs in Elixir with Absinthe</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="cjbottaro" data-post="96" 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/cjbottaro/48/1469_2.png" class="avatar"> cjbottaro:</div>
<blockquote>
<p>If not, what’s the big benefit to it?</p>
</blockquote>
</aside>
<p>An example from one of the linked papers: <a href="https://www.irif.fr/~gc/papers/set-theoretic-types-2022.pdf" rel="nofollow">https://www.irif.fr/~gc/papers/set-theoretic-types-2022.pdf</a></p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/8/d/8daa7d7c28a408689ad17d6ba9250be7f0478045.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/8daa7d7c28a408689ad17d6ba9250be7f0478045" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/8/d/8daa7d7c28a408689ad17d6ba9250be7f0478045.jpeg" alt="image" data-base62-sha1="kdeB0i82iDK9wNLSCZU5NXoKjiJ" width="690" height="120" data-dominant-color="E3E1E3"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1200×210 36.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Another practical example involves using types to model states. You can have functions that work on “all states except state X and Y”.</p>
<p>Beyond that, it ends up being super important for functions that have multiple clauses. For this I simply recommend reading the papers, they highlight all of this, I’d just be repeating them verbatim here.</p>
<p><a href="https://elixir-lang.org/blog/2022/10/05/my-future-with-elixir-set-theoretic-types/" class="inline-onebox" rel="nofollow">My Future with Elixir: set-theoretic types - The Elixir programming language</a> see the " Why set-theoretic types?" section.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="cjbottaro" data-post="94" 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/cjbottaro/48/1469_2.png" class="avatar"> cjbottaro:</div>
<blockquote>
<p>TypeScript, but friends and colleagues keep showing me what it’s capable of and it’s quite impressive. From what I understand, it’s opt out,</p>
</blockquote>
</aside>
<p>That kind of depends on your tsconfig, I mean is it opt-in or opt-out. If you have strict or noImplicitAny etc. set then you are opt-out.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just thinking out loud here playing devils advocate with myself..</p>
<p>If you have a function input who’s type cannot be proven to match a more restrictive type specification then the compiler could warn about this, perhaps even emit an error.</p>
<p>Those cases can be handled using case expressions to santise the inputs or alternatively could be silenced by defining a more generic function variant that has less restrictive types and perhaps raising an error.</p>
<p>Only when you do not have sufficient function variants that collectively cover all of the implied types based on caller inputs should that be an actual compiler error.</p>
<p>Seems reasonable…</p>
<p>The described “fix” above of using less restrictive function variants could potentially avoid a lot of case expressions and leverage the language function pattern matching, but this is really only applicable for modules you directly control.</p>
<p>.. and now I can see this driving idioms, such as developers creating defensive “catch all” functions just to avoid type errors or being forced to write lots of case expressions.</p>
<p>… and potentially dealing with function input santisation using module delegates to keep the compiler quiet for modules I don’t control.</p>
<p>… but still having almost identical runtime behaviour of raising an exception and crashing on unsupported inputs.</p>
<p>The only difference I can see in the approaches above is where you sanitise, at the caller or at the callee, and elixir pattern matching works really well for the latter.</p>
<p>There seems to be an unresolved tension between “let it crash” when function pattern matching fails (which is something I love about the language because I can code for the happy path) and the potentially new need to silence the compiler through manual sanitising of inputs, essentuallycoding for the sad path at either caller or callee (or even more madeningly potentially both once the coding standards committee have their way).</p>
<p>All this pushes the “sanitization” back into some form of hand rolled code to silence the compiler, with basically the same runtime effect and overall less developer and runtime efficiency before a type system existed.</p>
<p>How much do we really gain other than a lot more typing and overhead when the new idioms for keeping the compiler happy become “best practice”?</p>
<p>The coding standards committee of do gooders will not accept code with warnings, and if there is an option for warnings to be treated as errors, the nannys will demand it, entrenching manual santisation practices further.</p>
<p>All said, rather than me being happy coding mostly the happy path I will be unhappy coding the sad paths just to keep the compiler happy, only to end up raising exceptions to still “please crash” on bad parameters that don’t match expectations.</p>
<p>I will also express some caution, and suggest the type system to be “advice only” because taking the path of treating them as compiler warnings and errors means the nanny coding committees will undoubtedly drive the kind of behaviour and idioms like I have described above.</p>
<p>What I would really value in a type system is identifying opportunities where function argument types and return values can be expressed more restrictively but are not, to drive tighter specifications from the bottom up. This would suggest that “catch all” functions variants are bad for detecting programmer mistakes (and are a bad idiom for addressing compiler errors) and the strategy for fixing a type error should be to drive more restrictive types up the call chain with case expressions used at the boundary/external interface layer.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="294082" 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/99">Post #98</a>
	                </div>
	            </div>
              <div id="likers-container-294082" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="294082"
                     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 #98"></div>
  </section>
</div>
    <div class="postbit" id="294091" data-post-id="294091">
  <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="cjbottaro" data-post="94" 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/cjbottaro/48/1469_2.png" class="avatar"> cjbottaro:</div>
<blockquote>
<p>For the massively uninitiated like myself, why doesn’t Elixir just copy TypeScript? I’ve never actually used TypeScript, but friends and colleagues keep showing me what it’s capable of and it’s quite impressive. From what I understand, it’s opt out, and Elixir’s system has to be opt in? Is TypeScript “set theoretic”? If not, what’s an example of something set theoretic can do that TypeScript can’t and what are the benefits?</p>
</blockquote>
</aside>
<p>Elixir is a functional programming language, JavaScript is object-oriented. While they are both dynamic, Elixir is more assertive with patterns and guards, JS is more polymorphic. The deeper you dig, the larger the differences. We should look at TypeScript for ideas, but copying probably won’t make sense.</p>
<p>In any case, you are talking about two distinct things here. One is syntax (which I am not much concerned about at the moment). The other is semantics. TypeScript does include unions and intersections (Racket as well) but TS does not include negations. Unions use the known <code>|</code> operator, intersections use <code>&amp;</code>, which I dislike. Even then, they are not fully set-theoretic, and there is <a href="https://hal.science/hal-02181137/document" rel="nofollow">a technical paper</a> that explains things you can model with full-set theoretic types and you cannot in Racket/TypeScript.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>How will generics be handled in Set Theoretic type system?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ any except nil -&gt; string or exception
def to_str(num), do: ...
def to_str(atom), do: ...
...

</code></pre>
<p>Or we simply omit the type defs?</p>
<p>Is it possible to even have something like the above imaginary syntax?</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Original post contains link to a page that explains things and has links to videos and podcast. Maybe in couple of those videos it’s explained that plan is to support multiple type declaration lines per function like</p>
<p>$ types<br>
$ types</p>
<p>So you can create one line per function pattern match etc.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The design principles document mentions generics, and I think Jose talked about them in his talk.</p>
<p>An example from the document:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ ((a -&gt; boolean()) , [a]) -&gt; [a] when a: term()
def filter(fun, []), do: []
def filter(fun, [h | t]) do
  if fun.(h), do: [h | filter(fun, t)], else: filter(fun, t)
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="294104" 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/103">Post #102</a>
	                </div>
	            </div>
              <div id="likers-container-294104" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="294104"
                     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 #102"></div>
  </section>
</div>
    <div class="postbit" id="294128" data-post-id="294128">
  <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">
								<aside class="quote no-group" data-username="derpycoder" data-post="101" data-topic="56827" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/derpycoder/48/31388_2.png" class="avatar"> derpycoder:</div>
<blockquote>
<p>How will generics be handled in Set Theoretic type system?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ any except nil -&gt; string or exception
def to_str(num), do: ...
def to_str(atom), do: ...
...

</code></pre>
<p>Or we simply omit the type defs?</p>
<p>Is it possible to even have something like the above imaginary syntax?</p>
</blockquote>
</aside>
<p>I’m not certain but I think this might be a place where the <code>dynamic()</code> type is used. Though if you really need the negation maybe <code>term() and not null()</code> or something would be more likely.</p>
<p>EDIT:<br>
Oh nevermind, I see the reply above mine is more likely correct with respect to generics.</p> 
	            </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>so I’ve thought about this <em>a lot</em> and it turns out even using dynamic() or when: doesn’t really work for certain cases.  Wrapped Enum.reduce is the big one.  The “right thing to do” is to allow the module author to embed a custom type-transforming lambda into the module attributes, this is a planned feature in selectrix.</p>
<p><a href="https://github.com/ityonemo/selectrix/issues/28#issuecomment-716645458" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/ityonemo/selectrix/issues/28#issuecomment-716645458</a></p> 
	            </div>

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