[IronPython] Extension methods...  Keith J. Farmer kfarmer at
thuban.org Tue Sep 20 18:38:21 CEST 2005  LINQ is *very* simple.
It's simply, as Anders puts it, a pattern for describing
queries.  It's made useful by way of extension methods and the
compiler deciding to convert a lambda expression not into a
delegate, but into an expression tree. The query methods (Where,
OrderBy, Select, etc) take trees, and build up a description of
the query which is then evaluated only when enumerated. This
allows DLINQ, for example, to analyze the tree and produce a SQL
command to send to a database, or XLINQ to produce an XQuery
expression, or LINQ to just take it as-is.  If you'd used a list
comprehension, you'd end up pulling all the information down
from the database (were this a database table); since this is an
expression that can be analyzed, you can manipulate it before
it's actually invoked.   You can conceivably take the expression
and ship it whole to some service, for the service to deal with.
Were this a CLR