Remix.run Logo
▲ egorfine an hour ago

What does %LANGUAGE% have anything to do with the goal? Totally same principles apply for any other lower level language: Zig, C.

While Rust is awesome, a lot of times the only apparent reason to chose Rust over C is virtue signaling.

Update: like I said, Rust is awesome and has so many advantages over C it's not worth a discussion really. But again I see that many projects are choosing Rust not because of merits but simply because it's a fashion.

▲eterm an hour ago | parent | next [-]

> the only apparent reason to chose Rust over C is virtue signaling

If you'd said another memory safe language I might have been on board, but C? We've seen a complete collapse in the ability of software to go un-hacked and un-exploited. Not all of that is down to poor memory safety of course, but it's a category of vulnerability that is massively increased in both surface and risk by choosing to write C.

Choosing Rust alone might be virtue signalling, but choosing a memory safe language is just pragmatic.

▲tialaramex 9 minutes ago | parent [-]

In this particular topic (performance) Rust matters because it will deliver excellent performance. You could write a container -> map -> map -> container flow in fifty memory safe languages, but probably it would be a bit slower than the nasty hack you'd write in C to convert the data in place. Rust isn't, if you're intrigued you will discover that Rust 1) figured out that the two containers must be the same size in memory so it can re-use the original container and 2) did the in-place conversion even though that wasn't what you wrote, because it's faster.

So magically the Rust was just as fast, but much more readable and when a junior (or an LLM) modifies it slightly so that the output container is bigger it won't suddenly segfault due to that scary in-place conversion loop now being a bounds miss, the Rust won't attempt the in-place conversion now that it can't work.

▲QuantumNomad_ 44 minutes ago | parent | prev | next [-]

> a lot of times the only apparent reason to chose Rust over C is virtue signaling.

Quite the opposite. Outside of a couple of very specific kind of cases (for example working with microcontrollers not supported by Rust toolchain), there is no good reason to choose C when you could choose Rust.

Choosing C over Rust means throwing away the memory safety features that Rust gives you for free. And for what? There is just no upside to choosing C in the vast, vast majority of cases.

▲virtualritz 40 minutes ago | parent | prev | next [-]

That's a pile of bollocks.

Rust protects you from a whole class of bugs (borrow checker) and lets you enforce almost as many invariants as you chose, through the type system.

LLM are just as bad as humans at enforcing/tracking ownership and invariants.

We maintain two code bases; one is TS and the other Rust.

Both are by now written foremost by agents (since August 2025, I'd say).

We had numerous non-(business)-logic bugs in the TS code base over this period.

Zero such bugs in Rust. Because the compiler catches them for us. All bugs we had in that code where actual logic bugs. I.e. the spec already had the bug or contained an oversight.

Zero.

We have since started rewriting the TS code base in Rust and will likely switch over in the next three months.

▲jph an hour ago | parent | prev | next [-]

Today I added Rust checked arithmetic which detects and protects math bugs such as integer addition overflow and division by zero.

Rust checked arithmetic is built into Rust's standard library (std) via explicit methods on primitive integer types (such as checked_add, checked_sub, checked_mul, and checked_div), which return Option<T> and evaluate to None on overflow. There's a known tradeoff of some speed, which is fine for my purposes because I need reliability more than raw speed.

I'm longtime C coder so I know how to do this in C. Rust strong types and static analysis make it so much easier to do correctly.

▲Conscat 33 minutes ago | parent [-]

This is in the C23 standard library as well, just without nice sum types sadly.

▲booi an hour ago | parent | prev | next [-]

That's actually why we chose Rust over C at my new company, Virtual Signaling as a service™. We rewrite anything in Rust for companies looking to virtue signal.

▲jstanley an hour ago | parent | prev | next [-]

Rust's incredibly strict and detailed static analysis, while a huge headache for human developers, is really useful with LLMs.

▲IceDane an hour ago | parent | prev [-]

> While Rust is awesome, a lot of times the only apparent reason to chose Rust over C is virtue signaling.

That seems like an extremely dubious claim.

Rust is just a lot more pleasant to work with in every possible way. C has the abstractive capabilities of a deaf-blind toddler.