Live data from Hacker News

Microsoft seeks Rust developers to rewrite core C# code

theregister.com

41–50 of 256 posts

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

#41
post #6

What's the point of rewriting from C# to Rust, as C# is performant enough and already has memory safety? What will offset the huge rewrite cost?

Considering the Microsoft consumer software that burns cycles to do trivial things (Teams, OneDrive, pick your favorite example). I do not think language performance should be a compelling argument.

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

#42
post #15

Earlier quoted context omitted.

C# doesn't have ownership/lifetimes and the kind of safety that comes with them. Also, at the scale of Microsoft’s core global services, when you are paying for the processing, fast enough (or “CPU efficient enough”) isn't the same as with common apps. Even small efficiency gains are going to yield sufficient savings to be worth a fair amount of developer time.

> 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

#44
post #37

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…

The trick is to introduce Rust wherever you're at, assuming it's a good fit for the task. This may be harder to do if you don't have enough influence.

Quick way to be annoying and unlikeable at work.

The times I've seen rust introduced, and tried it my self, it introduces a whole bunch of related tech debt. Like hacks to make builds work

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

#45

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…

On the reverse side of things, trying to find a C++ dev is usually harder than finding people who want to write Rust.

I suppose C++ devs are on the correct side of the demand curve, unlike myself. :D

I was _really_ tempted to take a C++ job at some point but I held out.

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

#46

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…

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.

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

#47
post #37

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…

The trick is to introduce Rust wherever you're at, assuming it's a good fit for the task. This may be harder to do if you don't have enough influence.

[deleted]

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

#49
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?

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/fundamentals/runtim...

[2]: https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...

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

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

What pain does it save most folks from that are using GC languages (as GP alluded to)? Genuinely curious.
Post reply on HN