Kategori: .NET

  • Book review – Get Programming with F#

    It’s been a while since I finished Get Programming with F# by Isaac Abraham but I haven’t come around to review it, until now. Learning functional programming has been one of my personal goals this year. I started out with Functional Programming in C# by Enrico Buonanno which explains a lot of the concepts of […]

  • New C# 9 features and their F# counterparts

    I recently watched Mads Torgersen’s video presentation of C# 9 from Microsoft Build and also read his presentation on the same topic titled Welcome to C# 9.0. It is obvious that the C# team is heavily inspired by functional programming and many of the new features have equivalents in F# (where they have existed for […]

  • Results in F#

    I recently wrote a blog post on the Option type in F# and how to use it to represent the abscence of a value, for example when looking up a user in a database by trying to match an integer with a user id. If no user with a matching id exists, Option lets you […]

  • Options in F#

    In the last post I compared the new Nullable reference types that were introduced in C# 8 with using Option from language-ext, which tries to mimic the functional paradigm approach to representing the abscence of a value. One of the major drawbacks of Option in C# is that there is no built in language-support, instead […]

  • Nullable reference types compared to the Option monad

    I wanted to investigate how Nullable reference types, the new big feature that was introduced in C# 8, compared to the Option type from language-ext. But let’s start with some information to set up the scene. Nullable reference types The way to indicate the abscence of a value in C#, as well as in many […]

  • Book review: Functional programming in C#

    I have been interested in functional programming for quite some time, experimenting with both F# and Clojure as well as trying out some Scala. But I must admit that I have never really put full focus on it for any longer period, not until I found this book: Functional programming in C# – How to […]

  • .NET under the hood – The ’null’ keyword

    I assume that you are familiar with the null keyword in C#. It represents a null reference, one that does not reference any object, and even though it has no type it can be assigned to any reference of any type. Null as a concept is quite abstract. It is often used to represent the […]

  • A functional approach to error handling in C#

    Imagine that you want to write a simple console application that queries the user for two integers, divides the first integer with the second, and writes the result to the console window. What can go wrong in a simple program like this? The first thing that comes to mind is probably that the user might […]

  • The end of the .NET Framework?

    I remember last autumn when I was out jogging. I was listening to an episode of a well known podcast on programming and the future of .NET was discussed. The hosts and the guest on the show were discussing the role of .NET Core and I remember that they recommended using Core for green field […]

  • When to NOT use interpolated strings

    I am currently reading the newest edition of Jon Skeet’s book ”C# in depth” (https://csharpindepth.com/) which is a quite interesting read so far. There is however one thing in the book that made me feel really bad about myself. You see, I really think interpolated strings helps improve readability quite a lot, and therefore I […]