title: Did XQuery give birth to LINQ?
body: <p>I was reading up on XQuery (from this link: <a href="http://www.altova.com/mobiletogether/xpath-intro.html" rel="nofollow"><code>[1]</code></a>). And LINQ (more accurately Query Expressions) seems to be an almost carbon-copy of it. So I'm wondering if Microsoft actually just copied XQuery and threw some syntactic sugar over it. I would say inspired but it doesn't seem strong enough a description.</p>
  
  <p><a href="http://weblogs.thinktecture.com/cnagel/2006/04/linq-vs-xquery.html" rel="nofollow">An example:</a></p>
  
  <pre><code>// LINQ - Query Expression
  var winners = from r in racers
     where r.Wins &gt; 3
     orderby r.Wins descending
     select r;
  
  // XQuery
  for $racer in doc("racers.xml")/Racers/Racer
    where $racer/Wins &gt; 3
    order by $racer/Wins descending
    return $racer
  </code></pre>