logoalt Hacker News

egorfine • today at 9:38 AM • 7 replies • view on HN

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.


Replies

eterm • today at 10:15 AM

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

➕ show 1 reply
QuantumNomad_ • today at 10:20 AM

> 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 • today at 10:24 AM

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 • today at 10:00 AM

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.

➕ show 1 reply
booi • today at 10:12 AM

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 • today at 9:41 AM

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

IceDane • today at 10:11 AM

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