title: Groovy Closure reuse vs rehydrate copy
body: <p>In the <a href="http://docs.groovy-lang.org/docs/latest/html/documentation/core-domain-specific-languages.html" rel="nofollow noreferrer">DSL page of groovy</a> they show this</p>
  
  <pre><code>def email(Closure cl) {
    def email = new EmailSpec()
    def code = cl.rehydrate(email, this, this)
    code.resolveStrategy = Closure.DELEGATE_ONLY
    code()
  }
  </code></pre>
  
  <p>Why are they calling <code>rehydrate</code> instead of just assigning the delegate to the closure:</p>
  
  <pre><code>def email(Closure cl) {
    def email = new EmailSpec()
    cl.delegate = email
    cl.resolveStrategy = Closure.DELEGATE_ONLY
    cl()
  }
  </code></pre>
  
  <p>In other words, why do we need a copy of the closure instead of reusing the one given. I don't necessarily see a problem with using rehydrate but I also don't see the need, which tells me there's something I'm not understanding</p>