Chuck Jazdzewski talking about LINQ and loops

If you are using a loop, you’re doing it wrong

Rather long post by Chuck, but worth reading.

Think about loops and how LINQ changes a perspective on the problem.

This entry was posted in Delphi. Bookmark the permalink.

3 thoughts on “Chuck Jazdzewski talking about LINQ and loops”

  1. Raymond Wilson says:

    Hi Chuck,

    Thanks for the article. While I am not yet involved in using C# or LINQ I can see it is a very
    different way of approaching problems.

    I will admit to a bad case of syntactic shock when I first saw your last two examples
    showing how you put it all together! While my being a neophyte here will explain a lot of it
    I do wonder if the intent of the code has not been obscured, at least to the developer other
    than the writer who is tasked with doing something with the code. Certainly I suspect LINQ
    isn’t an option for reducing the need for comments 😉


  2. It is more the question to the author.
    Along with WCF, WPF and other new things in VS 2005/2008 and .Net 3.x, LINQ is something to keep eye on for sure.

    PS. I was just wondering where does Bold/ECO now stand with release of these new parts…

  3. I believe your shock comes from two places, first, unfamiliarity with the map/reduce pattern this code uses and, second, from a fairly awkward syntax. If a Reduce() call be writen something like,

    var ranges = reduce a, b in ranges where a.Style == b.Style select MergedRange(a, b);

    it would be a bit more clear but I am stuck with the syntax C# already has.

    As for comments. I agree which is why I included them in my example.

Leave a Reply

  • About

    From being a junior developer all the way to Development Manager position, I was always interested in new technologies. Passionate speaker, IT junky, developer, architect, team lead, and development manager - many hats, one goal - making software better and closer to people’s needs. For the most part I am using my blog as a scratch pad, writing small articles on things which I came across, was asked about more then once, and which would otherwise require additional research again and again.

    View Serguei Dosyukov's profile on LinkedIn
  • Testimonials

    I’m a huge fan of this theme. I’ve got more than 90,000 pictures in my gallery3 running on a Ubuntu...


    I've been using this [theme] since the start. It is by far the most attractive, feature packed and stable of...


    The greydragon theme is fantastic. It’s clean, stable and feature rich. It took me a while to decide to move...



  • Categories