I’m reading through this article on msdn. A few observations from a functional programmer’s perspective:

  • Expression tree. MSDN does a poor job explaining the concept of meta programs. Expression trees are simply order 1 meta programs. “Expression tree” is more or less referring to the implementation, which does not help understand the concept at all.
  • Deferred execution. This is simply call-by-name evaluation. It is NOT lazy evaluation, as it is evaluated every time the value is needed. It is not cached as a lazy evaluation would. Since there is no referential transparency in C#, there is a semantics difference.
  • Aggregate. This is simply a left fold operation.
  • SelectMany. It is just a composition of concat and Select.
  • Anonymous type. It’s just a tuple.