> Not to nitpick, but Linq to XML is based on Linq to objects entirely (no
> IQueryable, juste vanilla IEnumerables).
>
You're correct.
> To my - naive - knowledge of clojure macros, writing an provider in
> clojure would be a lot easier than it is in C# (or even with F# quotations).
>
>
I would agree with that, but what is missing with macros is a formalized
specification. With IQueryable we can concat queries, and generalize
algorithms completely separate from the input provider.
For example:
public static IQueryable<Person> Over21(this IQueryable<Person> q)
{
return q.Where(p => p.age > 21);
}
Now in C# we can do this:
var people = database.Over21().ToList(); // Compiles to SQL WHERE clauses
var people = vector.Over21().ToList(); // Compiles to an in-memory filter
So this is the power of IQueryable. It decouples the query code from the
provider.
Datalog was brought up earlier, I wonder if it could be extended to provide
this sort of interface.
Timothy
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en