Live data from Hacker News

Microsoft seeks Rust developers to rewrite core C# code

theregister.com

191–200 of 256 posts

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

#192
Does anybody know more about the "Substrate App Platform group"?

As far as I understood it, actually Microsoft Exchange and ESENT powers a lot of Office 365, e.g. the compliance tools, the search and e.g. teams chats. Next to it is another pillar: Sharepoint, which is also exposed as OneDrive and is based on SQL server.

Is substrate or has it been part of Exchange?

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

#193

Earlier quoted context omitted.

It only works one way though (at least in this case). If you know C++ you can quickly become proficient in Rust. But not the other way around.

If you know rust, you can carry the same ideas to C++. My C and C++ skills greatly improved as I got better with rust. The compiler forces you to learn proper memory management and that carries over. Smart pointers? Just Box, Rc, Arc and Refcel. Move semantics? It's just another name for ownership. Sure, the OOP stuff are different, but okay, that in and of itself shouldn't hinder you.

If it's an experienced C++ job and you don't know the difference between rvalue/lvalue/etc, you're gonna have a tough time.

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

#194

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…

There are tons of Rust jobs in blockchain.

I’m interested. Can you tell me what do rust developers build or work on in this space? Where do you start networking and build the demonstrable skills to get into blockchain?

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

#195
post #162

Earlier quoted context omitted.

In their defence, there are entire classes of security bugs that memory safe languages protect you from. A large percentage of the security bugs in Chrome, OpenSSL, iMessage and lots of other apps wouldn’t have happened in any of the languages you listed. Or, almost certainly, in Rust.

And how many of such bugs could be prevented with compiler warnings and flags?

I suspect fewer than you think. At least in FAANG code.

Google chrome has had a fair few CVEs over the years despite having a lot of the worlds best security researchers working full time looking for security vulnerabilities.

I think someone has tried reading the compiler warnings.

There’s an old story about John carmack running a new static analysis tool on the quake3 source code. The code worked well. The tool apparently found a huge list of issues in the code - including a massive pile of real bugs. Then he tried another static analysis tool and it found more real bugs. And so on.

The story is well worth a read. This is a great takeaway:

> This seems to imply that if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

C++ is really hard to do “right”, at any scale in a real team.

http://www.sevangelatos.com/john-carmack-on-static-code-anal...

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

#196
post #126

Earlier quoted context omitted.

I don't care that it's hard to learn. What turns me off rust is that if I ever make a change that requires a lifetime annotation, I now have to go back through all my code potentially adding lifetime annotations to everything it touches. I was making a little toy compiler in rust and basically gave up when I wanted to make a change that would have amount to string -> string_view in c++ because in rust I now need to t…

The last few versions made a lot of the lifetimes elided so you can drop them.

I feel like this has been this way for at least two years, too?

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

#197
post #79

Earlier quoted context omitted.

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.

    docker run --name docker-nginx -p 80:80 nginx

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

#198

Earlier quoted context omitted.

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.

It only works one way though (at least in this case). If you know C++ you can quickly become proficient in Rust. But not the other way around.

Are you sure? Many C++ programmers who have learned rust report that it has also made them better C++ programmers.

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

#199
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…

He wasn't talking about memory safety. Rust's lifetime/ownership features were originally created to provide memory safety, but it turns out they actually provide more than that and are very good at preventing ordinary logic bugs too.

I don't know if anyone has really investigated why this is the case but it definitely is.

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

#200
post #39

Earlier quoted context omitted.

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.

* Ownership is very clear. In most GC languages ownership of objects is shared between everyone that can access it. That encourages bugs.

* You can trivially make objects immutable. That feature is tacked on to most GC languages (e.g. Object.freeze) and rarely used, if it's even available. Again mutability of everything encourages bugs.

* You can easily copy values.

* You can use RAII to deterministically and automatically clean up resources, and guard things (e.g. using mutexes).

These features are all in C++ too but Rust lets you have all that and memory safety (and it's better designed than C++).

A classic bug that you wouldn't see in Rust might be passing a list into a function and the function mutating it when you weren't expecting it to. Basically impossible in Rust.

Post reply on HN