Tuesday, August 4, 2009

Lambdas for LINQ

I went to the monthly CMAP meeting tonight. I didn't want to -- I had been working on a problem with PHP and translated text. But I'm glad that I did go.

Tonight's meeting had free pizza, a long-ish advertisement for Telerik (one of their sponsors), and a presentation about LINQ. The latter was the most interesting.

Microsoft added LINQ to the .NET framework and its languages a few years ago, in release 3.0. The advertised reason was for easy connection to databases and web services. I must admit it does deliver on that promise. In .NET 2.0, queries required quite a bit of ceremony; in .NET 3.0 and LINQ, queries are brief and to the point.

But the changes for LINQ were not simply new classes in the .NET framework. Microsoft changed the compilers (for C# and Visual Basic at least) to allow the new syntax for easy queries. They changed they was code is generated and possibly the CLR run-time engine to allow for new code constructs such as lambda expressions.

These changes are significant and keep Microsoft competitive with other technologies. Cloud computing needs the ability to create lambda expressions, if you want to use it effectively.

What bothers me is that Microsoft has hidden these changes. They have not advertised them; while LINQ uses them it does make them obvious. The magazine articles I have read laud LINQ and explain its neat-o capabilities for queries but don't explain the underlying changes. Is Microsoft ashamed of them? Afraid of them? Fearful that their average developers will be unable to understand or use the advanced concepts? I don't know.

As a bonus, I won a book at the group's end-of-meeting raffle. It is the Visual Studio 2008 Unleashed tome. Rather heavy. Not sure that I want to read it.

No comments:

Post a Comment