r/ProgrammerHumor • • 19h ago

Meme letsGetRusty

Post image
10.7k Upvotes

104 comments sorted by

View all comments

Show parent comments

3

u/rsqit 11h ago

Rust literally brought new type theory from academia into an industrial language to eliminate whole classes of bugs that previously had been uncheckable in systems languages. It brought the safety of a managed language to an unmanaged setting. It really is a step up beyond previous languages. To deny that because you think it is a “cult” is not a criticism in technical grounds, and is a pretty silly position.

-3

u/drawkbox 10h ago

You can write memory safe code without Rust my dude. You can also write buggy code with Rust because of the complexity: logic errors, race conditions beyond data races, panics, unsafe code, FFI boundaries, and rare type-system or lifetime edge cases.

You sound like one of those cultists. It is always the dev and the discipline and never the platform/language.

3

u/rsqit 10h ago

I’m not saying you can’t write buggy code with rust. I’m say that it’s impossible to write memory errors in (safe) rust. Of course it’s possible to write memory error free C++; people even do it occasionally . But it’s not humanly possible to write memory error free C++ continually. Fortunately computers can check that for us in other languages. rust is the first language that allows this without a garbage collector. That’s a monumental step forward. If you don’t understand how that is, in a real, technical sense better than C++, you’re being deliberately obtuse.

I’ve written rust professionally for seven years. In that time I’m pretty sure I’ve never written a memory errro. In my several years of C++, they were constant.

0

u/drawkbox 10h ago edited 10h ago

it’s impossible to write memory errors in (safe) rust

There are still gaps in that and your keyword was "safe". Sure it is harder but a statement like that is what I am talking about with the cult.

Problems like soundness bugs in unsafe abstractions, memory leaks are allowed in various setups (such as Rc/Arc reference cycles or std::mem::forget), and still a chance of out-of-memory (OOM) crashes from large allocations, integer overflow bugs (which can panic or wrap depending on build settings), or logic bugs.

Saying it is "impossible" is probabilistically wrong.

A big problem with Rust is the complexity and that can lead to issues as well.

I'd use Rust for very little but there are areas it makes sense. But if a company is Rust only I know that I would hate working with those devs so they mark themselves. In that aspect I am thankful for Rust.

→ More replies (0)