Sunday, January 13, 2008

Behind the scences of LINQ

I always knew that LINQ was founded on the idea of monads but even trying hard I couldn't understand how LINQ and monads are related to each other.

But fortunately there is Wes Deyer and he describes in The Marvels of Monads what I always wanted to know. It's a pity that LINQ was always described and documented as query language rather than as a monad extensions. When I look to the msdn-documentation there is no hint that I could implement query operators on other types than IEnumerable and IQueryable.

But that's exactly what Wes is doing. He sees a more general concept and he shows a way to implement the query operators on any type. In fact this is for me a huge step and leads us to a new level of abstraction where LINQ (as a list-monad) seems to be a specific case of a monad.

My preferred way to use LINQ was the method syntax as I thought this is the more general case. But now, after knowing that the query syntax is something like a monad extension I start to like it.

5 comments:

Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...

I like your blog

Anonymous said...

If you could give more detailed information on some, I think it is even more perfect, and I need to obtain more information!
Personalized Signature:金陵热线棋牌游戏中心,名城苏州游戏中心,云南信息港游戏,彭城视窗棋牌游戏中心,江苏互联星空棋牌游戏中心,广西休闲游戏中心,安徽棋牌游戏中心

Anonymous said...

I think I come to the right place, because for a long time do not see such a good thing the!