LINQ and Simplicity

I've been thinking this week about the impact that LINQ will have on the development world. If LINQ succeeds, it will change the way we think about programming. The team's ambitions for LINQ are large. As the community PM for C#, my job is fairly obvious: I need to help us find a way to make LINQ succeed.

LINQ gives developers a tool built into their native language that allows them to query data. It is perhaps a bit shocking that this has never been done before. Most of the applications C# developers build are designed around databases. Why should our primary language for writing database applications not include a useful mechanism for querying data?

If LINQ succeeds, then it will be impossible for any major language to omit such a tool. For instance, any language that forces developers to embed SQL strings in their source code will be considered hopelessly old fashioned.

If LINQ succeeds, then it will represent a change in the way we build applications that is comparable to the change wrought by the introduction of object oriented programming. Like object oriented programming, however, LINQ requires a major conceptual change in the way developers think about their code. 

As LINQ is rolled out over the next months, we will finally discover whether or not this brave new idea will succeed or fail. If it succeeds -- and it probably will -- it will change the way we think about programming. Nevertheless, we sit perched on the edge of a considerable drama, and it will be exciting to watch it unfold.

Overcoming Complexity

When working with LINQ it is hard not to be seduced by the complexity of its internal implementation. Really smart people who like to think about compilers find LINQ interesting because its implementation is both challenging and relatively unique. The functional programming ideas found in LINQ are not new, but the idea of embedding a functional programming language inside an a mainstream imperative language like C# is relatively unique. The techniques the developers of LINQ used to make this possible are both arcane and fascinating.

The problem, however, is that the people who use C# daily in their work are not interested in esoterica about expression trees, lambdas or extension methods. They have a job to do, and they want to get it done quickly so they can go home and play World of Warcraft.

Most developers are interested in complexity. But their craving is easily sated by the job they face. Most of them don't have either the time or the desire to learn about esoteric compiler details.

As I look ahead over the coming months, it seems to me that my job is fairly obvious. LINQ needs to be presented to developers in a way that makes its utility immediately obvious. The focus has to be on its usefulness, not on the artfulness of its implementation. There is room for the discussion of both issues, but the first task is to show why LINQ is useful, and how easy it is to use. 

Comments (9)

  1. Welcome to the XVII Community Convergence. This post is dedicated to Steve Teixeira’s Granddad, who died

  2. Lennie says:

    Hi Charlie:

    Does that mean your going to provide some LINQ tutorials?

    I downloaded C# 3.0 (.Net 3.0) and start to play with it. Nice… 🙂



  3. Steve says:

    I get boo hoo’d for this idea – but in the same way that SQL created the ‘Query Builder’ – C# needs a ‘LINQ Builder’.  

    This solves a few issues (1) the complexity, (2) ensuring correct syntax and best of all (3) using a LINQ Builder would quickly teach developers how to right LINQ queries to the point they wouldn’t need the builder any longer.

  4. Keith Farmer says:

    Actually, some of us want to go home from writing LINQ at work to writing LINQ to Warcraft… 🙂

    (from p in Warcraft.Realms.Current.Players

    where p.Race = Warcraft.Races.Draenei)



  5. ccalvert says:


    Yes, we do intend to get some tutorials or basic texts out in the next months.

    I’ve been writing some preliminary sketches here:

    And more advanced material, also in preliminary form, is showing up here:

    – Charlie

  6. gozh2002 says:

    I wonder now LINQ is about querying data in developer language, so are you going to have

    a simlar stuff for assembly process like monad support finally?

    I know WF is there but looks still too much coding for me.

  7. In my 30 years of programming I have seldom been so excited by a technology as I am with Linq. I agree that we are on the brink of a evolution in software as we move query into the language. However one must not lose sight of 2 things:

    1 – Linq is much more than a ORM tool in fact it will run on top of an ORM as has been done for nHibernate. It will change how we think about programming to any collection or XML. I really find this idea appealing as we apply one progamming model to most data sources. Life becomes so much simpiler.

    2. In the SQL world there will always be cases where we need T-SQL directly such as perfomance and really complicated queries (although in this case I think you need to look at your schema). Linq allows for this as it does not try to provide all the functionality of an ORM and thus their complexity.

    We are eager to get our hands on the released code as it is frustrating to have to use tools that pale in comparision to Linq. It is great to see that Microsoft is producing a evolutionary technology as they have been accused of being the follower.

  8. Thiago says:

    I am having a good time with LINQ. I am just worried about reusability on LINQ queries. what do you guys have to tell me about that?

  9. Brian Ilyas says:

    Charlie, LINQ is great no question about it, but why Microsoft creates trouble for all of us developers. Orcal, DB2 or any other database, even Foxpro has these functionalties (idea is same querying tables). Now Microsoft is implementing query table in language after 13 years). DCOM, DLL hell etc and at the end going in right direction, but look for millions for developers microsoft has caused grief because Microsoft does not where they are heading.  

Skip to main content