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. …

5

Saving the State of Enumerators

Cyrus and I were writing some code together the other day and we used an interesting data structure that I wanted to share with you.  This data structure I will call a chain which is essentially a immutable singlely linked list. interface IChain<T> : IEnumerable<T>{   IChain<T> Next { get; }   T Value { get; }} It is…

4

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…

4

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…

3

captivated foreach statements

I am sure that most people who use C# regularly use the foreach construct.  Intimately understanding this construct is not usually required for proper usage.  The syntax is straightforward and it would seem that the semantics would also be straightforward; however, beginning in C# 2.0 there is a subtle gotcha that can cause seemingly odd…

0

the first step

I suppose that I should begin with an introduction.  My name is Wes Dyer and I am a developer on the C# compiler team.  I have many interests in the area of computing including but not limited to compilers, artificial intelligence (especially machine learning), data mining, and enterprise software.  Previously, I was doing research in…

0