Comment by DaiPlusPlus

1 day ago

> C# has been used as the primary language in various hobby/research kernels.

That's quite the oversimplification...

C# is not a systems-programming language: it's an application-programming language that is heavily dependent on the CLR runtime environment. While those research-kernels certainly do bring a-kind-of-CLR into the kernel it's far from being like the CLR in .NET; but they don't use C# - at least, not the same C# you use in Visual Studio: those research kernels: Singularity, Midori and Verve - used not only the Sing# and Spec# extensions to C#, they had their own compiler (Bartok) which itself enabled other language-extensions.

That said, those extensions are fascinating reads:

Sing# concerns message-passing ( https://www.microsoft.com/en-us/research/wp-content/uploads/... )

Spec# added Ada-style (i.e. compiler-enforced) invariants and pre/post-conditions (this was the basis for the Code Contracts feature which was annoyingly/tragically killed-off during the .NET Core reboot in 2016); see https://www.microsoft.com/en-us/research/project/spec/

Bartok: https://www.microsoft.com/en-us/research/wp-content/uploads/...

> C# is not a systems-programming language

Incorrect, the main restriction are the targets supported by CoreCLR/NativeAOT/Mono(to an extent).

Or, at least, if you pick all memory-safe languages with GC, C# offers the most when it comes to low-level access.