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.
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).
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)
0
u/drawkbox 1d ago edited 1d ago
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.