Live data from Hacker News

Microsoft seeks Rust developers to rewrite core C# code

theregister.com

51–60 of 256 posts

Re: Microsoft seeks Rust developers to rewrite core C# code

#51
post #39

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.

Just like Jesus!

Re: Microsoft seeks Rust developers to rewrite core C# code

#52
post #42
post #15

Earlier 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?

C# is IDisposable [1] for that kind of stuff and has the "using" block [2] to make it hard to get wrong.

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

#53
post #42
post #15

Earlier 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?

That's great, but not relevant to the topic of memory safety in C#, which is all I was addressing.

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

#54
post #42
post #15

Earlier 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?

[deleted]

Re: Microsoft seeks Rust developers to rewrite core C# code

#55
post #42

Earlier 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…

>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.

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

#56

I 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.

Seems like RUST needs work to become easier to learn. Hard for a business to take a risk on using it (outside of a use case absolutely needing a memory safe language) if the talent pool is shallow.

Re: Microsoft seeks Rust developers to rewrite core C# code

#57
post #42

Earlier 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…

Doesn't the compiler complain if you don't use using or try? I forget

Re: Microsoft seeks Rust developers to rewrite core C# code

#58

I 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…

We acquired a product last year, where the entire back-end was written in Rust.

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

#59

Earlier 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.

Are you not a developer? Being proficient in one means that it will take very little time to transfer to the other. C++ and Rust have a great deal of overlap in that way.

Re: Microsoft seeks Rust developers to rewrite core C# code

#60
post #26

Earlier quoted context omitted.

Is that needed because the compiler accesses some higher privileged APIs?

Why would a compiler needs any privileges, it's like a text editor

In widows, you get bonus points if your program needs administrative rights
Post reply on HN