Earlier quoted context omitted.
That’s funny because I downvote almost any “in Rust” post here! C# — and garbage collected languages in general — aren’t going anywhere. With the shift to Arm, languages compiled for a runtime interpreter will get even more important for Microsoft.
Given your username I suspect you're quite a bit older. I've mentored several grey beards on Rust and they weren't at all happy about it, at first. After a few months though, they were some of its strongest advocates. It's hard to not love Rust when you realize just how much pain it saves you from.
Microsoft seeks Rust developers to rewrite core C# code
51–60 of 256 posts
Re: Microsoft seeks Rust developers to rewrite core C# code
#52Earlier quoted context omitted.
> C# doesn't have ownership/lifetimes and the kind of safety that comes with them. That's not really true. Like rust, C# is memory safe, although it comes at it in a very different way. "safe" rust does inherently prevent a certain kind of race condition in multi-threaded code that C# does not, thought that's more of a nice incremental improvement, not a fundamental one -- i.e. it doesn't make your multi-threaded cod…
Rust gives you clear semantics on when it drops a variable, so it's being used not only for memory safety but to close files, kill threads, synchronization primitives, and whatever else you want (can be implemented via Trait). Does C# have any kind of GC behaviour guarantees that are similar?
1. https://learn.microsoft.com/en-us/dotnet/api/system.idisposa...
2. https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
Re: Microsoft seeks Rust developers to rewrite core C# code
#53Earlier quoted context omitted.
> C# doesn't have ownership/lifetimes and the kind of safety that comes with them. That's not really true. Like rust, C# is memory safe, although it comes at it in a very different way. "safe" rust does inherently prevent a certain kind of race condition in multi-threaded code that C# does not, thought that's more of a nice incremental improvement, not a fundamental one -- i.e. it doesn't make your multi-threaded cod…
Rust gives you clear semantics on when it drops a variable, so it's being used not only for memory safety but to close files, kill threads, synchronization primitives, and whatever else you want (can be implemented via Trait). Does C# have any kind of GC behaviour guarantees that are similar?
I think you are making a point in the broader discussion of C# vs. rust, but that doesn't fit here. (And, personally, I don't care about that so have nothing to say on the topic.)
Re: Microsoft seeks Rust developers to rewrite core C# code
#54Earlier quoted context omitted.
> C# doesn't have ownership/lifetimes and the kind of safety that comes with them. That's not really true. Like rust, C# is memory safe, although it comes at it in a very different way. "safe" rust does inherently prevent a certain kind of race condition in multi-threaded code that C# does not, thought that's more of a nice incremental improvement, not a fundamental one -- i.e. it doesn't make your multi-threaded cod…
Rust gives you clear semantics on when it drops a variable, so it's being used not only for memory safety but to close files, kill threads, synchronization primitives, and whatever else you want (can be implemented via Trait). Does C# have any kind of GC behaviour guarantees that are similar?
Re: Microsoft seeks Rust developers to rewrite core C# code
#55Earlier quoted context omitted.
Rust gives you clear semantics on when it drops a variable, so it's being used not only for memory safety but to close files, kill threads, synchronization primitives, and whatever else you want (can be implemented via Trait). Does C# have any kind of GC behaviour guarantees that are similar?
Not really. There's the IDisposable interface you can implement, and some language features around making it easy to use[2], however there's nothing preventing you from not using those language features and forgetting to call Dispose. In case you forget the GC will call Dispose but it's entirely up to the GC when that happens, so personally I wouldn't say it's similar. [1]: https://learn.microsoft.com/en-us/dotnet/fu…
This actually has to be implement in the classes finalizer its not done automatically. The finalizer is called by the GC which if the designer chooses can call Dispose. This is usually done in well designed classes that use unmanaged resources.
Dispose and using give you the determinism if you want it and the finalizer gives you the backstop to prevent leaks if it makes sense.
Re: Microsoft seeks Rust developers to rewrite core C# code
#56I love writing Rust, but I was really surprised by how difficult it was to find a job _actually_ writing Rust. I'm happy to see the increased activity in the space, but searching for a job in Rust is probably still 10x harder than C or C++. It worked out in the end, and I'm happy to be getting paid to be writing Rust every day, but I hope that the market for Rust jobs continues to grow -- ideally even faster than it…
Agree, I am still looking for a Rust position, although I have more than 3 years of experience with it. And yes, it is very hard. It seems Rust is in a chicken/egg position: employers avoid it because "there are few developers", developers avoid it because "there are few jobs". Until recently the majority of Rust jobs were blockchain stuff. Now I see a rise in network infrastructure and security.
Re: Microsoft seeks Rust developers to rewrite core C# code
#57Earlier quoted context omitted.
Rust gives you clear semantics on when it drops a variable, so it's being used not only for memory safety but to close files, kill threads, synchronization primitives, and whatever else you want (can be implemented via Trait). Does C# have any kind of GC behaviour guarantees that are similar?
Not really. There's the IDisposable interface you can implement, and some language features around making it easy to use[2], however there's nothing preventing you from not using those language features and forgetting to call Dispose. In case you forget the GC will call Dispose but it's entirely up to the GC when that happens, so personally I wouldn't say it's similar. [1]: https://learn.microsoft.com/en-us/dotnet/fu…
Re: Microsoft seeks Rust developers to rewrite core C# code
#58I love writing Rust, but I was really surprised by how difficult it was to find a job _actually_ writing Rust. I'm happy to see the increased activity in the space, but searching for a job in Rust is probably still 10x harder than C or C++. It worked out in the end, and I'm happy to be getting paid to be writing Rust every day, but I hope that the market for Rust jobs continues to grow -- ideally even faster than it…
Unfortunately, Rust developers were hard to get by, and we didn't have any internally that could maintain the Rust code at such scale.
The entire back-end ended up being re-written.
Re: Microsoft seeks Rust developers to rewrite core C# code
#59Earlier quoted context omitted.
On the reverse side of things, trying to find a C++ dev is usually harder than finding people who want to write Rust.
Yup, we were hiring C++ devs recently and it was quite common for candidates to mention Rust. Did they not read the job description??? Immediate red flag.