title: Difference between Groovy String variable replacement
body: <p>When looking at examples of variable substitution in GStrings, I have noticed two difference syntaxes.  This can be seen here: <a href="http://groovy.codehaus.org/Groovy+Templates" rel="noreferrer">Groovy Templates</a></p>
  
  <p>This has the example:</p>
  
  <pre><code>def text = 'Dear "$firstname $lastname",\nSo nice to meet you in &lt;% print city %&gt;.\nSee you in ${month},\n${signed}'
  </code></pre>
  
  <p>It looks like ${variable} is used more commonly when you have an expression, but $variable is used when you just have a single variable, but even here they mix it with $firstname and ${month}.  Is there a reason to do it one way or another when you have a single variable and not an expression, or does it not matter?</p>