I would like to use lambdas with a custom object model. The lambda would be turned into a parse tree and I would execute that against my application object model, much like DLINQ or XLINQ are able to do so. This requires that somehow the compiler know what are valid properties, operators, types, variables, etc in the expression. How is this accomplished Will this be available to the end-user of LINQ. This would make it possible to use LINQ with any data store, not just those supported by the MS compiler.

Lambdas and type/variable checking
nhanson
Previous comments from the C# team allude to work to make it easier for third parties to leverage the expression trees to construct queries. Also, if you search this forum, you'll see that Ron's working on implementing DLinq for C#2.
Jiaquan Ma
This all sounds very similar to Lisp S-expressions and Lisp Forms. :-)
>> You still get the advantage of strong typing. However, the C# compiler has no knowledge about the extent to which your API may be able to interpret the expressions.
Doesn't this beg for some sort of a compiler extensibility feature to allow third parties to verify the basic "correctness" of the expression tree at compile time Or perhaps the expression trees are so dynamic in nature they couldn't be evaluated at compile time
Coool123
It is possible to write an expression that compiles to a legal expression tree that cannot be translated to SQL by DLINQ.
You still get the advantage of strong typing. However, the C# compiler has no knowledge about the extent to which your API may be able to interpret the expressions.
Chubbly Geezer
(Of course, I'm still rooting for the ability to pass the tree as-is to Yukon...)
Rajasekhar
Have you reflected on the expression tree that is constructed (eg, set a breakpoint in the debugger)
The compiler need not know what's valid for your particular backing store. Based on my take on DLinq, it's the job of the adapter you write to convert the tree into zero or more queries of the store, plus maybe some client-side code to take care of what the store cannot. The compiler itself remains oblivious of the capabilities of the store, even if it's MSSQL.
Victor DelPrete
Wislars