Other articles


  1. RAGRETS.md: Bad default()s

    This post is part of my continuing series on language regrets, where I discuss things I regret about C# and would avoid in a reboot. I previously wrote about covariant arrays, which is a widely regretted feature among the C# design team. This time I'd like to talk about my …

    read more
  2. The Anti-Constraint

    As ref structs in C# have become more popular, their interaction with generics has become a more common pain point. In particular, the restriction that ref structs cannot be substituted for generic parameters is rough. The basic problem with generics is pretty simple: ref structs have a variety of special …

    read more
  3. RAGRETS.MD

    A while back Swift developer Joe Groff tweeted a proposal that projects have a REGRETS.MD file describing "regretful design choices that can't be reversed for time, compatibility, etc. reasons." This seems like a good idea, both to help developers who are trodding similar ground, and also for me to …

    read more
  4. Lambdas and Local Functions

    Ever since local functions were added in C# 7 a common user question has been, "when should I use them instead of a lambda?" They're both forms of functions that can be nested within other functions, so it's reasonable to ask what the difference is. First, it's probably useful to …

    read more
  5. Stamping Git SHAs into Your Binaries

    Have you ever looked at a binary from a project you wrote and asked, "Where the hell are the sources for this?" Well, I'm about to make your life (and the lives of your customers) a bit easier. I'm going to show you how to write the Git SHA1 for …

    read more
  6. Cool Colors in WSL/Bash

    As some may know, before joining Microsoft to work on the C# compiler I was a pretty dedicated Linux user (Arch, thanks for asking) and despite finding replacements for a number of my Linux workflow standbys, I've never found a good substitute for the Unix shell. Enter the Windows Subsystem …

    read more

social