Functional Programming (FP) did not really click with me until I saw how it utilizes composition of functions to model pipelines of tasks. Lots of sources on the internet mention immutability and algebraic types as great advantages of FP but it was composition that won me over. In particular, composition is perfect for describing workflows …
Tag Archives: F#
Using single case union types for entity IDs in F# and make it work with Dapper
In C# it is a common and popular pattern to use strongly typed entity IDs instead of using integers or the likes for IDs on your entities. Strongly typed entity IDs is a great help when trying to prevent you from mixing an Order ID with an OrderLine ID. Andrew Lock recently wrote a series …
Continue reading “Using single case union types for entity IDs in F# and make it work with Dapper”
Which is better for teaching? C# or F#
Recently I have had the pleasure of training a couple of colleagues in the wonders of programming. At work we use C# for most of our applications so naturally I started preparing my material in C#. I did not get very far before it occurred to me: This is going to be a long haul… …