Continuing the discussion from Rust beginner notes & questions:

The discussion that revolved around C# is linked here. Relevant quotes from the linked posts are given below.

Rust beginner notes & questions Right now, for the kind of work I’m doing, the runtime overhead of C# for me is relatively unimportant compared to its productivity, which is the best of any language I’ve personally used. My next step up would be switching to F# on dotnet core, as that would both boost my productivity and performance significantly. The extra 20%-50% runtime performance from Rust just isn’t worth it compared to the drop in productivity.

Rust beginner notes & questions With something like the new C# Pipeline I/O API, the low-level parser would start off with a Read<Item=u8> , make the encoding decision, and then the high-level XML parser could use Read<Item=char> . The encoding switch at the beginning would be very neat because you just don’t call consume() ; This would work fine even on forward-only streams such as a socket returning compressed data. Similarly, if the String type was instead a trait that &[char] mostly implemented, zero-copy parsers would be fairly straightforward with this overall approach… Behind the scenes, advanced implementations could keep pools of buffers and use scatter/gather I/O for crazy performance. The developer wouldn’t even have to know… This is what the new C# I/O API is trying to do, but it’s not using the power of template programming to the same level that Rust could . Compare the C# Iterator<T> interface to the Rust Iterator trait. It’s night & day!

Rust beginner notes & questions people have written operating systems in C# If you’re referring to the Midori project, no, they haven’t. The project fell apart, and well before that happened, the language used evolved quite a ways away from standard C#; so much so, in fact, that it was christened M#. (Joe Duffy’s blog has many interesting details.)

Rust beginner notes & questions help Absolutely. I would the say the same about C#. That said, one thing that can be mentioned in Rust’s defense is that C# has GC which makes a lot of decisions easier. We only have to look at the state of the art prior to Rust when it comes to non-GC languages to appreciate that Rust is a huge improvement. That said (recursively), not all of Rust’s difficulty or unsightly parts stem from the memory-management challenge it’s set for it itself.

Rust beginner notes & questions help I also happen to really like C#, and used to use it quite extensively. But, it’s also not perfect . The bifurcation of reference vs value types is there, and there are some footguns with using value types. Some of you might remember how lambdas used to desugar in for loops, capturing the value only for the last iteration in some cases (that was fixed at some point). The .NET standard lib used to be extremely allocation happy and it was a challenge to write performant code. Alt…

Rust beginner notes & questions help I think to call C# a really well-designed language is a bit of an overstatement. As far as I’m concerned (and I like both Java and C# for what they are) it is just Java with a little better support for value types. They frankly got it wrong with exceptions (as you mentioned). They got it wrong in how they handle “null” (as you mentioned). They got it wrong wrt to volatile (as you mentioned). It really is only a marginal, at best, improvement (and that is even debatable) over Java. I really can’t…

Rust beginner notes & questions help IMO, C# is a well-designed language. Is it perfect? No, as mentioned. But I don’t know any perfect language. I’ve not followed it too closely in the last few years, but I recall in the beginning there was nice consistency and “flow” to features added in version N and how they enabled something else in version N+1. There’s a lot right about C# if you don’t mind a GC/JIT/managed runtime. To call C# “just Java with a little better support for value types” is … disingenuous at best :slight_smi…

Rust beginner notes & questions help I honestly wish I could do exactly that, but I don’t use Rust enough to really contribute meaningfully. I’ve dabbled with it just long enough to determine that it won’t help me in any future projects. Right now, for the kind of work I’m doing, the runtime overhead of C# for me is relatively unimportant compared to its productivity, which is the best of any language I’ve personally used. My next step up would be switching to F# on dotnet core, as that would both boost my productivity and perform…