Re: WO vs. .Net 3.5 LINQ

Mike Schrag <[email protected]> Sat, 1 Dec 2007 17:12:15 -0500
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
> Anyway ...... just briefly looking at the LINQ intros online, it  
> seems little more than simplified MS SQL Server SQL built into the  
> language ..... big deal .... who cares.
In MS's defense, LINQ is more abstract than that, and a LITTLE bit  
interesting ... For instance, you can construct a LINQ query against  
an XML document (so it effectively behaves like XPath, but in a  
unified query language).  Also, when combined with anonymous types and  
type inference, you actually get dynamic "classes" back that  
correspond to the results (for instance, if you query a first name and  
a last name, you actually get an anonymous type with .FirstName  
and .LastName properties).  I don't, however, know how much is exposed  
underneath LINQ, so I don't know if you can write your own "adaptors."

re: the syntax, it's actually kind of an interesting background.  They  
moved the "from" part to the front of the syntax entirely to  
accommodate CodeSense.  In SQL, as you start to type a "select", you  
don't know the domain that you will be selecting from, so when you  
perform a completion, you don't know what completions are possible.   
By moving the "from" part forward, CodeSense knows the entities that  
you will be selecting from, so it can actually offer proper completion.

ms