Functional C# with Simon Painter
Why write functional C#? Carl and Richard talk to Simon Painter about what happens when you apply functional programming approaches to your C# code. Simon discusses how some functional programming aspects are best served in a functional language like F#, but you can write C# in a more functional style. The conversation focuses on minimizing side effects - writing your code so that you can see what it does and how it would behave when changed. Functional code tends to be more testable as well!
Guests:
Simon Painter
Simon Painter been working as a .NET developer since 2007 in a variety of industries including government, retail, and manufacturing. He's been hacking around with computer code since he was old enough to read his Dad's copy of the ZX Spectrum BASIC coders manual. Simon has been speaking about Functional C# at various user groups and conferences around the UK, USA, Europe, and Australia. He's particularly interested in seeing just how far we can push C# without breaking it.
Links:
- Blazor United https://www.youtube.com/watch?v=48G_CEGXZZM
- Discriminated Unions in F# https://learn.microsoft.com/dotnet/fsharp/language-reference/discriminated-unions
- Discriminated Unions in C# GitHub Issue https://github.com/dotnet/csharplang/issues/113
- Records in C# https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record
- Rec in F# https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/recursive-functions-the-rec-keyword
- Monads by Mark Seemann https://blog.ploeh.dk/2022/03/28/monads/
- So you Wanna be a Progrrammer https://wannaprogram.com
- Railway Oriented Programming by Scott Wlaschin https://fsharpforfunandprofit.com/rop/
- Functional Programming in C# https://www.oreilly.com/library/view/functional-programming-with/9781492097068/