Video on Linq Queries and Delayed Evaluation

I recently recorded a video with Charlie Calvert about Linq queries and delayed evaluation.  You can find it here (streaming video).  Download it here.


About Queries

This concludes my series of posts about queries.  I will still discuss them occassionally and if anyone has any specific questions then I would be very glad to address them. Query Expression Posts 1. Comprehending Comprehensions What are queries?  How are queries treated by the compiler?  2. Transparent Identifiers How are local variables introduced by queries? 3. …


Another Model for Query Interpretation

An imperative model for interpreting Linq to Objects queries has already been discussed, but are there any other models or method for interpreting queries?  It turns out that there are other models.  Linq to SQL queries operate in a completely different manner.  In the discussion about Linq to Object queries, it was pointed out that…


Having Trouble with Queries

A Funny Joke and a Sad Joke There is a joke that goes something like this: Two men are hopelessly lost in hot air balloon.  Their condition is aggravated by the fact that they are enshrouded by a thicket of fog.  When it seems all is lost, suddenly the fog parts and miraculously a man is standing…


How Linq to Objects Queries Work

If you have ever tried to step through a Linq to Objects query in the debugger, you may have been mildly surprised at the results.  It may have seemed as if the program had a mind of its own and ran certain expressions when it wanted to and not when it was supposed to.  Be…


A Model for Query Interpretation

Evaluating Query Expressions After writing the code to translate query expressions and remove transparent identifiers, one of my first desires was to write a tool that would generate query expressions to test the correctness of the code.  Of course, I already had a set of programmer tests in place to make sure that the code…


Reading and Writing Queries

Now that we have discussed some of the underpinnings of query expressions, we can turn our attention to how to use them. As has already discussed, most people who see query expressions immediately think of SQL and often even mistake query expressions for embedded SQL.  While it is true that there is a similarity in the…


Thus Quoth the Humble Programmer

I love Scheme!  It is such a beautiful language.  I was first introduced to it during college.  At that time, I thought it was an interesting language but I didn’t see the power of the language until later.  That moment came when I experienced reading The Structure and Interpretation of Computer Programs.  It was a…


Transparent Identifiers

My last post described in detail how query expressions in C# are translated, but I have a confession to make.  I did a little bit of hand waving through one part of the translation rules.  The astute reader (whomever that is, whenever I read such things I always wonder, “Am I that astute reader?”) may…


Comprehending Comprehensions

Not long ago, I was reading through some articles posted on when I came across an article claiming that C# is trying to be a dynamic language.  One user posted a comment that mentioned that C# 3.0 included among other things “embedded SQL”.  Unfortunately, it seems that there is still some confusion about what…