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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Module can even not exists at the compile time:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Foo do
  def setup(funcs) do
    Code.compile_quoted(quote bind_quoted: [funcs: funcs] do
      defmodule RuntimeLookup do
        for {name, value} &lt;- funcs, do: def unquote(name)(), do: unquote(value)
      end
    end)
  end

  def main do
    setup(foo: 42)

    IO.inspect RuntimeLookup.foo()
  end
end
</code></pre>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://ideone.com/R87j0V">
  <header class="source">
      <img src="https://d2c5ubcnqbm27w.cloudfront.net/gfx2/img/favicon.png" class="site-icon" alt="" width="16" height="16">

      <a href="https://ideone.com/R87j0V" target="_blank" rel="noopener nofollow ugc">Ideone.com</a>
  </header>

  <article class="onebox-body">
    <img width="" height="" src="http://profile.ak.fbcdn.net/hprofile-ak-prn1/50232_245768360841_3377786_q.jpg" class="thumbnail" alt="">

<h3><a href="https://ideone.com/R87j0V" target="_blank" rel="noopener nofollow ugc">Ideone.com</a></h3>

  <p>Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>This pattern was used in OTP &lt;21.2 when there was no <code>persistent_term</code> functionality, and nowadays it is still used from time to time when you need high performance calls, ex. OpenCensus can be configured to use such construct for speeding up metrics dispatch.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="149328" 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/what-are-the-scoping-rule-for-elixir-alias/26578/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-149328" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="149328"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jslearner" data-post="21" data-topic="26578" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/j/858c86/48.png" class="avatar"> jslearner:</div>
<blockquote>
<p>Please give example but why obfuscate when it won’t be hidden anyway?</p>
</blockquote>
</aside>
<p>For example, Protocol’s in Elixir make some hidden modules.  My ProtocolEx makes a hidden description module, etc…  You can still access them if you know the very ‘unique’ name they use (with <code>$</code>'s and so forth), just won’t be accidental.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="149335" 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/what-are-the-scoping-rule-for-elixir-alias/26578/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-149335" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="149335"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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