title: Is linq's let keyword better than its into keyword?
body: <p>I'm currently brushing up on LINQ and am trying to comprehend the difference between the <code>let</code> and using the <code>into</code> keyword. So far the <code>let</code> keyword seems better than the <code>into</code> keyword as far as my understanding goes. </p>
  
  <p>The <code>into</code> keyword essentially allows one to continue a query after a projection. (Just want to state explicitly that I'm not referring to the one for group join.)</p>
  
  <p>Given an array of names it allows one to do the following:</p>
  
  <pre><code>var intoQuery =
    from n in names
    select Regex.Replace(n, "[aeiou]", "")
    into noVowel
    where noVowel.Length &gt; 2
    select noVowel;
  </code></pre>
  
  <p>It takes the result of the select and places it into the <code>noVowel</code> variable which then allows one to introduce additional <code>where</code>, <code>orderby</code>, and <code>select</code> clauses. Once the <code>noVowel</code> variable is created, the <code>n</code> variable is no longer available. </p>
  
  <p>The <code>let</code> keyword, on the other hand, uses temp anonymous types to allow you to reuse more than one variable at a time. </p>
  
  <p>You can do the following:</p>
  
  <pre><code>var letQuery =
    from n in names
    let noVowel = Regex.Replace(n, "[aeiou]", "")
    where noVowel.Length &gt; 2
    select noVowel;
  </code></pre>
  
  <p>Both the <code>noVowel</code> and <code>n</code> variables are available for use (even though I haven't used it in this case). </p>
  
  <p>While I can see the difference, I can't quite understand why one would want to use the <code>into</code> keyword over the <code>let</code> keyword unless one explicitly wanted to make sure that previous variables were not able to be used in latter parts of the query. </p>
  
  <p>So, is there a good reason why both keywords exist?</p>