Monthly Archives: February 2013

Pattern matching in C# – part 1

In my previous post, I tried to explain what pattern matching is, and in particular the F# match expression, that I’m trying to mimic in C#. For my first attempt, I’ll try to analyse the matching cases that can apply … Continue reading

Posted in Functional Inspiration, Syntax Puzzles | Tagged , , | Comments Off

Pattern matching in C# – introduction

Although bringing real pattern matching to C# in not my objective, I’ve tackled yet another syntax puzzle, trying to build a “sort-of” F#-ish pattern-matching-like syntax. Disclaimer : as you can see from the quotes and italic, don’t expect me to … Continue reading

Posted in Functional Inspiration, Syntax Puzzles | Tagged , , | Comments Off

Functional Inspiration – A simple Option type

In F#, the option type is a built-in Discriminated Union type which allows to handle nicely the fact that an expression can represent some value or none. In C#, we have almost this construct when we use the Nullable<T>, but … Continue reading

Posted in Functional Inspiration | Tagged , | Comments Off