title: Purpose of "let expression" (LetExpr) in the Java compiler?
body: <p>The Java compiler seems to have support for <code>let</code> expressions in <code>com.sun.tools.javac.tree.*</code> (look for <code>LetExpr</code>).</p>
  
  <p>One comment in JCTree even mentions some syntax</p>
  
  <pre><code>(let int x = 3; in x+2)
  </code></pre>
  
  <p>which of course is not accepted by the grammar of the language and rejected in an earlier compiler phase.</p>
  
  <p>I'm wondering about the origin of this construct, which I have never seen before.</p>
  
  <p>Is it used internally by <code>javac</code> or is it synthesized by other tools? Is it maybe just an artifact from the very early days of Java from a language feature which never saw the light?</p>
  
  <p>Is there anything useful which can be done with it today?</p>
  
  <p><em>Generally speaking, why does it exist?</em></p>