|
|
|
|
|
by pjmlp
3927 days ago
|
|
> Are you complaining that people are using when they could reasonably avoid it or that it is too often necessary? They are abusing it, specially as workarounds for constraints that cannot be expressed in the type system. While in the languages I mentioned, unsafe constructs are related any operation that might lead to memory corruption, some Rust devs are using it for anything they assume isn't logical safe. So you then get talks like the Session Types one at ICFP, that uses unsafe to control functions being called outside the protocol Traits that are being defined. Which lead to discussions like this one: https://github.com/rust-lang/rfcs/pull/1236#issuecomment-136... |
|
That doesn't sound like abuse to me, as long as the exposed interface remains safe.
> some Rust devs are using it for anything they assume isn't logical safe.
That sounds like an objection to the scope of what Rust defines as safe. Unless you mean to imply there are reasonable, Rust-safe ways to rewrite the transgressions. In the former case I have to disagree. It would be nice if we could prove more. But you can't prove everything.
I haven't seen the ICFP talk but I might watch it later if you can link to a video. I've skimmed that discussion before but you will need to point out your objections—IMO it is great that Rust devs are having that discussion.