Live data from Hacker News

Microsoft seeks Rust developers to rewrite core C# code

theregister.com

91–100 of 256 posts

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

#91
post #2

I upvote almost any post "in Rust" here (yeah that's me) but this story went bit too far. It was just one job posting and so many sites acts like MS is going to ditch C#.

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.

> C# — and garbage collected languages in general — aren’t going anywhere.

So what? What does that have to do with rust? There’s no fight between C# and rust where only one language will survive. Both languages are great, and both languages probably have a bright future. C# depends on a lot of low level C/C++ code to function and run fast. I can imagine a future where rust enables c# to get better.

I love rust, but there’s also lots of programs and teams for which c# is a better language choice. So your comment is really weird to me - there’s no reason loving c# should impact your relationship with rust at all.

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

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

Yes, I did this at my startup. Fast forward a few years, and now the company has more Rust code than Python, and the majority of the company's IP is in Rust.

I suggest beginning with small, one-off things that don't have much impact. People, even developers, tend to shy away from things that aren't familiar. By introducing Rust in a small, low-risk way, it helps people get familiar with it. They get to build familiarity with building Rust projects, navigating the project structure, and reading docs. I submit pull requests that get people to read Rust code, even if it's just to say "looks good". Their familiarity builds slowly over time, meaning they'll be less triggered by seeing Rust in a larger, more impactful project down the road.

How do you boil a software developer? Slowly.

If they give Rust a chance and your team has a champion to guide them, they'll see its merits. I think a lot of people come to Rust for the performance, but that's not why they stay.

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

#93
post #82

Earlier quoted context omitted.

Learning Rust to the point of being productive is 100x easier than C or C++. It's not even funny.

That hasn’t been my experience with it. I found rust significantly harder to learn than C; and this is after I already knew C. (At least - learn rust to the point of feeling productive, and like I wasn’t fighting the borrow checker constantly). Arguably becoming an expert in C means you need to understand all the nuances of undefined behaviour. And that’s a much harder process. But it can happen slowly. Rust preloads…

> You essentially can’t write rust at all until you understand rust references, lifetimes (implicit and explicit) and the borrowchecker.

You can if you're willing to use stuff like .clone() and the interior mutability types. In Rust, you can tell when code has been written to be a bit sloppy because it has that kind of boilerplate. And the compiler checks are a huge help when it comes to refactoring the code and making it cleaner and better-performing.

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

#94
post #82

Earlier quoted context omitted.

Learning Rust to the point of being productive is 100x easier than C or C++. It's not even funny.

That hasn’t been my experience with it. I found rust significantly harder to learn than C; and this is after I already knew C. (At least - learn rust to the point of feeling productive, and like I wasn’t fighting the borrow checker constantly). Arguably becoming an expert in C means you need to understand all the nuances of undefined behaviour. And that’s a much harder process. But it can happen slowly. Rust preloads…

> I found rust significantly harder to learn than C

language itself maybe, but you also need to learn ecosystem, libs, build systems, testing.

Benchmark could be: how fast you can learn and bootstrap some type of app of your choice: high performance DB or torrent server, etc.

> You essentially can’t write rust at all until you understand rust references, lifetimes (implicit and explicit) and the borrowchecker

why is that? You can write rust the same way you write C but with nicer syntax, standard lib and build system and more potential to future expansion.

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

#95
I find this very strange, Microsoft has a lot of big internal high-performance services written in C#.

You have to be intentional about some things - largely making sure objects are very short-lived or very long-lived, to avoid long GX pauses. But .NET performs much better than it did 10-15 years ago and I can't think of a fundamental reason why you'd rewrite in Rust.

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

#96

Earlier quoted context omitted.

Why not just learn rust? It really is not that exotic to learn. I doubt it is faster to rewrite it.

Yeah, this is just baffling. A team can be so averse to learning new tools, good ones too, that they would rather dump their time into rewriting. Instead of getting paid to level up their skills, they'd rather block forward movement of the company's goals to maintain the status quo.

I'm a bit surprised at this, too.

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

#97
post #57

Earlier quoted context omitted.

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

It does. So does every IDE or linter.

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

#98
post #95

I find this very strange, Microsoft has a lot of big internal high-performance services written in C#. You have to be intentional about some things - largely making sure objects are very short-lived or very long-lived, to avoid long GX pauses. But .NET performs much better than it did 10-15 years ago and I can't think of a fundamental reason why you'd rewrite in Rust.

Might not be all about performance but about security aswell.

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

#99
post #84
post #82

Earlier quoted context omitted.

That hasn’t been my experience with it. I found rust significantly harder to learn than C; and this is after I already knew C. (At least - learn rust to the point of feeling productive, and like I wasn’t fighting the borrow checker constantly). Arguably becoming an expert in C means you need to understand all the nuances of undefined behaviour. And that’s a much harder process. But it can happen slowly. Rust preloads…

Given the number of CVEs that can be directly attributed to C and C++ you only need to be half-joking to argue that approximately nobody has managed to learn the languages sufficiently to write production code in them.

As uncomfortable as this is to say, the existence of latent security vulnerabilities doesn’t seem to stop people from shipping a lot of apparently working code in C and C++.

And I don’t think a lot of those CVEs come from people misunderstanding the languages. As I understand it they mostly come from honest software bugs. C++ makes it easy for honest mistakes by experts to become security nightmares. This is a controversial opinion - but I think the fault is in C and C++ themselves. Not the programmers who need to work even harder such that they stop ever making mistakes.

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

#100
post #79
post #73

Earlier quoted context omitted.

It’s a red flag because you’re going to get people bring in random languages just because, then they fuck off to another job and you’re left supporting code that nobody knows.

People _mentioning_ Rust means they will bring a random language into your stack if they are hired? This red flag cultural trend is blinding people to nuanced thought.

n=1 but I did bring Rust to my C++ job. I needed a web server, and I didn't want to put in an order with the web server team, and writing a web server in C++ looked like a recipe for pain.
Post reply on HN