Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » C#   (RSS)

Continuation-Passing Style

There are some technical words that cause quite a stir even amongst geeks.  When someone says the word "continuation" , people's eyes glaze over and they seek the first opportunity to change the subject.  The stir is caused because
Posted by wesdyer | 9 Comments

In Case You Haven't Heard

It has been a while since I have posted. We have been working hard to get Orcas beta 1 and beta 2 done. So I apologize for the long interlude between posts but I hope that you are enjoying beta 1 and that you are looking forward to beta 2. Now that beta
Posted by wesdyer | 90 Comments
Filed under:

All About Iterators

Design patterns have been all of the rage for a number of years now. We have design patterns for concurrency, user interfaces, data access, object creation, and so many other things. The seminal work on the topic is the Gang of Four 's book, Design Patterns
Posted by wesdyer | 16 Comments

Extending the World

When people think of C# 3.0 and Linq, they commonly think of queries and databases. The phenomenal work of the Linq to SQL guys provides ample reason to think of it this way; nevertheless, C# 3.0 and Linq are really much much more. I have discussed a
Posted by wesdyer | 26 Comments
Filed under:

Immutability, Purity, and Referential Transparency

How often do you write code that just works? It seems to happen so rarely that I find myself suspicious if code does just work. When was the last time that you wrote a non-trivial program that had no compile errors on the first try and then ran fine as
Posted by wesdyer | 32 Comments

Linq to ASCII Art

Last night I was searching for an audio version of Painters and Hackers by Paul Graham . Pretty soon I had completely forgotten about the book and found myself reading the Wikipedia article about Hackers . Isn't Internet search great? Of all of the things
Posted by wesdyer | 39 Comments
Filed under: ,

The Virtues of Laziness

It seems that I riled some people up with my blog post yesterday. After some thought, I think the primary reason that there was some backlash is because some people feel that I violated one of the sacred principles of FP: lists are *the* data structure.
Posted by wesdyer | 20 Comments

Why all the love for lists?

One of the things that I have noticed when participating in interviews with potential candidates is that most candidates have a favorite data structure. Presumably this is the data structure that they feel the most comfortable with. The problem is that
Posted by wesdyer | 14 Comments

Baby Names, Nameless Keys, and Mumbling

Baby Names I recently finished reading Freakonomics . It is a fascinating book about a number of strange phenomena. Its topics range from the economics of dealing crack to cheating in sumo wrestling. Among the sundry topics is a discussion concerning
Posted by wesdyer | 20 Comments
Filed under: , ,

Memoization and Anonymous Recursion

Keith Farmer brought it to my attention that there is at least a little confusion about how closures work. Hopefully, I can help shed a little light on the subject. The question is why doesn't the following code actually memoize fib in the call to Test?
Posted by wesdyer | 11 Comments

Anonymous Recursion in C#

Recursion is beautiful and lambdas are the ultimate abstraction. But how can they be used together? Lambdas are anonymous functions and recursion requires names. Let's try to define a lambda that computes the nth fibonacci number. Func<int, int>
Posted by wesdyer | 34 Comments

Currying and Partial Function Application

When I first heard the term Currying , I thought immediately of tasty Thai and Indian food. To my dismay, I found that the conversation was not about wonderful spices but rather about transforming a function that takes n arguments into a function that
Posted by wesdyer | 6 Comments

Function Memoization

One of my favorite pastimes is playing games. No not XBox 360, PS3, or Wii games nor other computer games, but board games, card games, and other such games. It's probably because I'm from a large family - I have 8 siblings - and we would often spend
Posted by wesdyer | 17 Comments

Video on Linq Queries and Delayed Evaluation

I recently recorded a video with Charlie Calvert about Linq queries and delayed evaluation . You can find it here (streaming video). Download it here.
Posted by wesdyer | 11 Comments
Filed under: ,

About Queries

This concludes my series of posts about queries. I will still discuss them occassionally and if anyone has any specific questions then I would be very glad to address them. Query Expression Posts 1. Comprehending Comprehensions What are queries? How are
Posted by wesdyer | 5 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker