As part of my talk at the Richmond Code Camp earlier in October, I had the opportunity to talk about how to implement functional aspects in C# 3.0. This talk revolved around such concepts as from mutable to immutable, from inheritance to functional composition, and the mind shift that is required. Part of this discussion involved very briefly a talk about monads. It's a very misunderstood part of computer science and one of the most powerful concepts to learn. Much like continuation passing style, this style is often maligned as a result. But, let's work to change that. What Is a Monad? Monads come to us originally from category theory. When monads applied to functional programming, they simply are a construction, given an underlying type system, embeds a corresponding monadic type system. Simply put, the values you have become amplified values that are to be interpreted by the matching monadic type. The f...
Content suppressed by ://URLFAN, for full article visit source
Functional C# - Pattern MatchingFrom: feeds.feedburner.com
Post Date: 2008-09-16 16:47:42
In the past, I've covered quite a bit of functional programming in C# 3.0 and how you can implement some of the basic constructs using the language. In preparation for the Richmond Code Camp coming up on October 4th, for which I'm planning to present "Functional C# -or- How I lost the foreach and learned to love LINQ", I'm revisiting some of the topics I've talked about in the past. One of those topics is pattern matching . Pattern Matching Ea...
more Object Oriented F# - More Extension EverythingFrom: feeds.feedburner.com
Post Date: 2008-09-12 20:47:45
In a previous post , I covered a few ways we can do extensions methods, properties, events and so on with F#. After a few chats, I realized I may have missed a couple of cases that I wanted to cover today. These two cases are extension operators and extension properties with indexers. With these examples, I'll try best to show you my development style, using my FsTest library from CodePlex to set up my expectations of the extensions using F# syntax. If you're not...
more Side Effects and Functional ProgrammingFrom: feeds.feedburner.com
Post Date: 2008-09-12 15:58:01
One of my first posts at CodeBetter was in regards to side effects and how, when unmanaged, can be truly evil. Today, I want to revisit that topic briefly in regards to functional programming and managing side effects. When I was out in Redmond a couple of months ago, I had the opportunity to sit down with Erik Meijer to discuss functional programming among other topics. In there, we discussed a number of issues around managing side effects and state in your code, and how bo...
more Object Oriented F# - Extension EverythingFrom: feeds.feedburner.com
Post Date: 2008-09-10 06:14:31
A post by Jeremy Miller caught my eye this morning in regards to extension methods in Javascript . While I think that's pretty interesting, I don't think it's a real fair comparison. Instead, I want to revisit C# and even F# with regards to extension methods, because there are a few things I wanted to point out. This is the start of a series covering object oriented programming techniques and how they are used in F#. Note that F# is not only a functional l...
more