title: Why are block variables optional?
body: <p>Non-block variables are obligatory:</p>
  
  <pre><code>def foo arg; end
  foo # =&gt; ArgumentError
  </code></pre>
  
  <p>In order to allow optional arguments, a default value has to be supplied:</p>
  
  <pre><code>def foo arg = nil; end
  foo # =&gt; nil
  </code></pre>
  
  <p>But block variables are optional:</p>
  
  <pre><code>def foo &amp;block; end
  foo # =&gt; nil
  </code></pre>
  
  <p>Without a default value, an absent block variable is assigned <code>nil</code>, and in fact, block variables cannot take default values:</p>
  
  <pre><code>def foo &amp;block = -&gt;{puts :foo}; end
  # =&gt; syntax error
  </code></pre>
  
  <p>On the contrary, a method can take an extra block that is not required in the definition:</p>
  
  <pre><code>def foo; end
  foo{puts :foo} # =&gt; nil
  </code></pre>
  
  <p>What is the advantage of block variables being designed like this as opposed to non-block variables?</p>