Tuesday, June 8, 2010


ב''ה




This book is making my head spin with its chapter on delegates and call back functions. I hope I understood it correctly.

Delegates and call backs are a mechanism for high order functions, like in functional programming.  You can pass functions into functions. However, it does not seem that it is built into the language of C#, but the compiler rearranges the code to work, as if the function was not passed in. You can chain them together which is pretty cool, so you can have more than one function go off together.

Still trying to wrap my head around what it really is for in C#...

I can not imagine it is quite as integral to the language as in Haskel, say, or that it has all the advantages of a functional language. Still, it seems the distinction is getting narrower and narrower...