FxCop rules for functional programming

Languages like C# 3 have come on great leaps and bounds when it comes to allowing a functional programming constructs. However, they are at heart imperative languages. I wonder whether you could use FxCop/Code Analysis rules to try to bully yourself into correct behaviours, like using immutable variables.

I have no idea how to go about doing this — particularly, I don’t really understand what the rules should be — but I think it would be interesting to develop a C# project with a set of rules promoting a functional style; it might be easier than, say, learning [F#](http://msdn.microsoft.com/en-us/fsharp/default.aspx?ppud=4).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s