Live data from Hacker News

Microsoft seeks Rust developers to rewrite core C# code

theregister.com

121–130 of 256 posts

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

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

Really people write a web server from scratch? What industry? Don’t tell me it’s some CRUD

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

#122
post #88

Earlier quoted context omitted.

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

Weirdly enough, some of the worst memory leaks I’ve debugged in my career were in GCed languages. Because any object can reference anything, retaining references can hide anywhere in the code. (Including via closures and other exotic things you forget about). And because in GC languages we don’t often have a destructor (or anything like it), it’s very common for people to forget to clean up resources. (Eg filesystem…

> And because in GC languages we don’t often have a destructor (or anything like it), it’s very common for people to forget to clean up resources. (Eg filesystem handles, sockets, wasm object references, and so on).

> One weird thing about rust is that network sockets and file handles are automatically closed when the handle drops out of scope. The borrow checker takes care of that. If you do the same thing in JavaScript (open a socket then do nothing), the program won’t even quit on its own and you’ll have no idea why.

That’s not an inherent problem of GC. You can have linear types or destructors in a GC language.

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

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

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

Eh. If you don’t know how references work in rust, you’ll struggle to use most of the standard library or any 3rd party crates. And if you can’t pass mutable references to functions or iterators there’s a lot of programs that will be hard to write at all. Performance will be pretty rubbish too.

You might be able to write some simple programs, but I wouldn’t say you know rust yet, or could really be productive with the language.

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

#124

Earlier quoted context omitted.

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.

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…

If you're fine with dropping safety you can just make a wrapper around a raw pointer. I wouldn't do it in public library but if it's fine for your cpp code then it's fine for your rust code. You can always drop to the "blow my feet off" level.

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

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

So you're saying there is no CVE in php, java, go, js, and python?

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

#126

Earlier quoted context omitted.

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.

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.

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

#127

Earlier quoted context omitted.

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.

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…

This effect of spreading everywhere is very frequently a novice mistake of putting temporary scope-bound loans (AKA references) in structs that aren't temporary views themselves.

People used to C or C++ perspective tend to reflexively (over)use references to avoid copying, but references in Rust are to avoid owning, and not-copying is handled in different ways.

BTW, apart from edgiest of edge cases, &String is a useless type in Rust, because String already stores data "by reference" and is never implicitly copied. For loans it's generally better to deref to &str.

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

#128

I'm not totally sold on rust as a language but I have to admit the tooling and ecosystem is really nice. I'm noticing that I'm increasingly using more stuff built with it. I'm also not sold on zig either for many of the same reasons. I prefer my low level languages to be smaller like c. I think that might be true for languages higher level languages too. I just don't like to have to down a lot of documentation on hun…

The tooling/ecosystem looks probably great for developers actively creating with it, but for developers ‘consuming’ it (downloading some foss from github and changing a couple of lines) it leaves a lot to be desired. Not being able to ‘apt install’ a working toolchain on Debian for example - it’s already too outdated after just a year

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

#129
post #114
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.

I feel like you’re giving rust a pass here. It would be a red flag if you were interviewing for react and decided to bring up vue or svelte or angular or whatever else as well. It’s not like it’s only this C++/Rust type deal that is being picked on. Although I would suggest that rust fans tend to be particularly ardent and loud at the current moment, so interviewers may be far more turned off of you as a person just…

I'm sorry but I'm having a hard time understanding why a person bringing up a tool in conversation during an interview is seen as such a clear and strong signal containing so much information about their professional performance.

But nowadays it seems like one has to 'turn on' an interviewer and avoid a minefield of forbidden words to get a job. If a workplace is to become a toxic cult-like environment being policed against such thoughtcrimes as being curious and interested in technology for its own sake I think one would be fortunate to be passed on after an interview to enter such a place.

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

#130
post #66
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#.

Totally agree. The .NET team itself is probably costing above 100 million every year, probably more. Microsoft is not ditching .NET, they are heavily investing it. The office division is implementing some code in Rust while the same division just posted a success story of their usage of migrating some low latency server code to .NET Core. Microsoft is a big company and like any other they use JS, TS, Rust, C++, Pytho…

They use a ton of java, they even have their own distro. In fact, they answer this question on its landing page (https://www.microsoft.com/openjdk):

> Java at Microsoft spans from Azure to Minecraft, across SQL Server to Visual Studio Code, LinkedIn and beyond! We use more Java than one can imagine.

Post reply on HN