3 ms·
I don't think this comment warrants the downvotes it's receiving, as it's entirely reasonable to conflate panics with unsafety if one is only used to "crashing"
by kibwen 10y ago
I don't think this comment warrants the downvotes it's receiving, as it's entirely reasonable to conflate panics with unsafety if one is only used to "crashing" in the context of C. It's a misconception that we get relatively frequently, so we may just need to make sure this is highlighted in our official tutorials.
- carols10cents 10y agoWe have a whole chapter on error handling in the second edition of The Rust Programming Language[1] that goes into these issues in detail. When we revise chapter 1 (we're doing that chapter last), we're planning on defining what Rust means by "safe". [1] - http://rust-lang.github.io/book/second-edition/ch09-00-error-handling.html http://rust-lang.github.io/book/second-edition/ch09-00-error...
- j1f4 10y ago> reasonable to conflate panics with unsafety if one is only used to "crashing" in the context of C. I suppose it's possible that's what generates most instances of this question, but I had the same question when I was first introduced to Rust and it came from a different root. I had been reading about Erlang, and from that context I expected "safety" to be about avoiding system downtime (e.g. gracefully handling failed asserts) as much as anything.