r/ProgrammerHumor • • 6d ago

Meme letsGetRusty

Post image
13k Upvotes

114 comments sorted by

View all comments

Show parent comment

2

u/rsqit 5d ago

I think you’re missing what memory safety means. Memory safety doesn’t mean these errros can’t happen. Memory safety means that if they do happen, they can be handled within the language itself, rather than the OS crashing the program. Panics are handleable in rust code; they don’t break the language abstraction.

Rust prevents errors that cannot handled by the program from happening outside unsafe blocks.

Rust obviously has other things like sum types for errors (go just gets this completely and utterly wrong).

1

u/drawkbox 5d ago

Sure but again "impossible" to cause memory safety issues is a stance that only those that dig Rust would make.

Memory safety means that if they do happen, they can be handled within the language itself, rather than the OS crashing the program

C#, Java, Go, Python, or Rust are all memory-safe languages that do just that.

Due to the complexity of Rust it can introduce additional issues that other languages may not.

As always, the tool that is best for the job is the best way to do the job. Being singular focused, as the cult is, is the problem.

You can't pretend Rust doesn't have an absolutely annoying cult around it. C'mon man!

1

u/the_horse_gamer 5d ago

C#, Java, Go, Python, or Rust are all memory-safe languages that do just that.

and only one of them does it without a GC

(also, Go is not memory safe in general. it's possible to data-race writes, leaving an enum in an invalid state, which will then segfault (or worse) when used)

1

u/drawkbox 5d ago

I'll say it again. As always, the tool that is best for the job is the best way to do the job.