Who would have thunk it?

Published 18 December 07 10:40 PM | MattManela 

I recently read this article about Lazy Computation in C#. What the article discusses is creating lazy evaluation in C#. 

Lazy evaluation is a key feature of functional languages like Haskell but is not common in imperative languages.  It is used in Haskell because it implements parameter passing on a call by need basis.  What this means is that a functions arguments are not executed until they are used but once used the argument retains its calculated value.  This is good because it prevents wasted computation since if a argument isn't used it isn't executed.

The article goes into details about how to create lazily evaluated arguments and why they are useful.

 

Now, I don't know if anyone else found this posts title funny but I did because a lazily evaluated argument used in Haskell and that the article shows how to create is commonly referred to as a Thunk.  :)

Filed under: , ,

Comments

# MSDN Blog Postings » Who would have thunk it? said on December 19, 2007 2:35 AM:

PingBack from http://msdnrss.thecoderblogs.com/2007/12/19/who-would-have-thunk-it/

Anonymous comments are disabled

About MattManela

I am a software developer at Microsoft. My blog is http://blogs.msdn.com/matt
Page view tracker