title: Groovy - as vs (cast)
body: <p>Is there any practical difference between the following two approaches to casting:</p>
  
  <p><code>result.count = (int) response['hits']['total']</code></p>
  
  <p>vs</p>
  
  <p><code>result.count = response['hits']['total'] as int</code></p>
  
  <p>I'm using <code>@CompileStatic</code> and the compiler is wanting me to do the cast - which got me wondering if there was any performance or practical difference between the two notations.</p>