title: What are some usages for make_ref() function in elixir?
body: <p>I saw a code snippet making use of <a href="https://hexdocs.pm/elixir/Kernel.html#make_ref/0" rel="noreferrer"><code>make_ref()</code></a> and not sure about the usability of this function.</p>
  
  <p>The hexdocs says:</p>
  
  <blockquote>
    <p>Returns an almost unique reference.</p>
    
    <p>The returned reference will re-occur after approximately 2^82 calls;
    therefore it is unique enough for practical purposes.</p>
    
    <p>Inlined by the compiler.</p>
  </blockquote>
  
  <p>But it does not really say when or why I should use it. Why would I use it and when should I use it? It seems to me that all it does is generate random numbers. Why can't I just use some sort of random number generator?</p>
  
  <p>This is what it does on terminal:</p>
  
  <pre><code>iex(1)&gt; make_ref()
  #Reference&lt;0.3569050097.3772514305.191818&gt;
  iex(2)&gt; make_ref()
  #Reference&lt;0.3569050097.3772514305.191837&gt;
  iex(3)&gt; make_ref()
  #Reference&lt;0.3569050097.3772514307.194286&gt;
  </code></pre>