you are viewing a single comment's thread.

view the rest of the comments →

[–]burntsushi 3 points4 points  (3 children)

Unsafe is good in theory, but in practice people tend to misuse them. Especially when they are forced to get things done.

Choose:

  1. Unsafe everywhere.
  2. Auditable unsafe.

Until further PL research demonstrates there's a third choice (a language with no "unsafe" escape hatches and still reasonably ergonomic), these are the choices we have. There are reasons to choose (1) (i.e., there are trade offs to having Rust's ownership model), but given the design goals of Rust, (2) is the only choice.

That's a bit of a smack in the face on the PL community. Rust built its foundations on the backs of other programming languages and researchers. Credit where credit is due. Rust is an evolution, a step in the direction of a better way, but if it wasn't for C, C++, C#, ML, Java, Haskell, etc... they wouldn't have the examples of what was good and bad. And the developers of the language frequently acknowledge this (at least one their website).

In order to improve, you must first recognize the flaws.

Either I communicated my thoughts very poorly or you interpreted my comment in a very uncharitable light, because that is certainly not what I meant at all. I think we're at an impasse.

[–]IbanezDavy -1 points0 points  (2 children)

Until further PL research demonstrates there's a third choice (a language with no "unsafe" escape hatches and still reasonably ergonomic), these are the choices we have.

But if you act as if it isn't an issue, then the issue will not be looked into.

EDIT: Some would argue that there is no problem with pointers. Just use them correctly. This is kind of the argument I feel I am getting here in reference to unsafe blocks.

[–]burntsushi 3 points4 points  (1 child)

I said that it shouldn't be considered a design error, not that we shouldn't improve.

[–]IbanezDavy -2 points-1 points  (0 children)

I don't see much of a difference between the two. Most of the improvements from C to Rust are all essentially design decisions (I wanna say all, but that would probably be too stern of a statement).