Digests » 417


Why Evolve to .NET MAUI?

The present day reality of going cross-platform with Xamarin.Forms isn’t too shabby, but there are some developer pain points that are being alleviated by .NET MAUI. When the future is so shiny and so close, there isn’t much harm in looking ahead. Here is an opinionated list of 10 things that get better as we evolve to .NET MAUI—let’s go.

this week's favorite

Waiting to never happen

It seems to me that when people discuss functional programming, they spend much time discussing side effects and how to avoid them. Sometimes, they almost forget that non-deterministic behaviour is also something to avoid.

The operation result pattern

The idea of a binary decision can be found in many places in our field : true or false, 1 or 0, tabs or spaces - it's either one or the other, though in in the last example there is only real choice…

It’s good to bet on .NET

The .NET today is not your parent’s .NET, and there’s a reason why it’s won most loved platform 3 years in a row in the annual StackOverflow developer survey¹. In fact, combining .NET Framework (a little older), with the new .NET Core stuff, it blows everything else out of the water by a longshot.

Unusual optimizations; ref foreach and ref returns

A really interesting feature quietly slipped into C# 7.3 - interesting to me, at least - but which I’ve seen almost no noise about. As I’ve said many times before: I have niche interests - I spend a lot of time in library code, or acting in a consulting capacity on performance tuning application code - so in both capacities, I tend to look at performance tweaks that aren’t usually needed, but when they are: they’re glorious.

Performance: Lambda Expressions, Method Groups, and delegate caching

Delegates are used to pass methods as arguments to other methods. The most common delegates are Action, Func<T>, and EventHandler. You can use a lambda expression to provide a delegate or you can use a method group. You can also cache the delegate into a field and reuse the instance when needed.