IgorShare Thoughts and Ideas

Consulting and Training

Dynamically Composing Expression Predicates

Posted by Igor Moochnick on 01/31/2008

Do not miss a great article about the internals of building dynamic LINQ queries – Dynamically Composing Expression Predicates.

I’ve still not quite bought the idea of LINQ. It’s compact, descriptive and strongly timed – all great, but … Actually I’d like to say: BUT! This “but” is a big question mark for the LINQ’s feasibility. It’s not flexible enough for our day-to-day tasks. It’s as hard-coded as “foreach” contract. More descriptive and nice looking, but still a very fancy “foreach” loop.

I think Dynamic LINQ is about to change my perspective on LINQ, but, while it gives more flexibility, it breaks the nice and fit LINQ constructs and brings us back to SQL-like queries where we have no strong types and no compiler-time check. Bottom line – back to square one.

I think we need either another .NET compiler revision to support dynamic LINQ (where it’ll allow us to emit LINQ queries from strings) or a some kind of LINQ Dom in-memory compiler library. I’m, actually, leaning towards the lateral (see my post CodeDom extensions and dynamic LINQ (string/script to LINQ emitting)).

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: