Modeling exceptions is hard. On the surface, it seems easy. Everyone knows what an exception is, right? But when you think deeper about it, there are a lot of traps that you can fall into. Throwing an exception is a goto Exceptions are hidden goto s...
I dig string interpolation in C#. It is concise and easy to use. And even though JetBrains Rider is known for making developers super productive with all kinds of templates and shortcuts, there was one thing I've missed - the ability to surround a v...
It took me a few tries to finally call an HTTP endpoint using F#.I've ended up with this code: let result = async { let client = new HttpClient() let url = "https://api.frankfurter.app/latest?amount=10.99&from=USD&to=PLN" ...
I'm a big proponent of using delegates instead of interfaces as described here. Recently I've found out that it works wonderfully with the partial application! Partial application is a concept widely used in functional programming. It's a function th...
using SAFE Dojo
Regularly I want to await a few tasks and get their result. Surprisingly, there is no obvious way to do that. Task.WhenAll can be helpful, as we see later, but it doesn't solve the problem.My common scenario looks like this: var dbTasks = getDataFrom...