Category Archives: Syntax Puzzles

Making program behaviour explicit

When observing developers in their day-to-day work, it’s quite usual to see them swearing at their programs, because they don’t behave as they should. You often see them asking the program to obey, sometimes cursing, and even praying from time … Continue reading

Posted in F sharp love, Syntax Puzzles | Tagged , | 1 Comment

Fun with turtles

F# is a great language to build internal DSLs, but I had no idea that you could go as far as what I’m going to present here… Let’s start from the start: my goal was to design some way for … Continue reading

Posted in F sharp love, Syntax Puzzles | Tagged , , , | Comments Off

Pattern matching in C# – part 4 – more tuples

DISCLAIMER: this post has been written months ago and never posted. By that time I was still trying to bring F# goodness to C#. This might be easier today with Roslyn, but that is not the path I’ve taken. Since … Continue reading

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

Pattern matching in C# – part 3 – tuples

Hello again, you potential RSS subscriber (probably still reading this in Google Reader, trying to determine which reader you’ll choose next) ! Last time I left you with a working pattern-matching mechanism in C#, but very limited… as it could … Continue reading

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

Pattern matching in C# – part 2

Last time, I just stopped before generating any real expression tree… Now is the perfect time to continue the process ! In order to handle match expressions where none of the expressions would match a given candidate, I decided to … Continue reading

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