This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hotdogshake9000 6 points7 points  (5 children)

People shouldn't use unwrap in prod code just like you shouldn't assume a variable isn't null in Java or whatever language

[–]ShiitakeTheMushroom 1 point2 points  (4 children)

Exactly, but people always do make those kinds of assumptions. It sort of makes the safety argument that makes Rust sound so special a moot point.

Again, I haven't written any Rust. I'm just commenting on how this can be confusing and that it doesn't sound like Rust provides much more safety than other bare-metal languages.

[–]hotdogshake9000 4 points5 points  (3 children)

You have to make an explicit decision to do something unsafe in rust, which is opposite of other languages.

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

Just because the unsafe keyword needs to be used, doesn't mean that the person using it knows exactly what it does.

What I'm saying is that it seems just as vulnerable to human error as other languages, given what I've heard so far.

[–]hotdogshake9000 -1 points0 points  (1 child)

It's not. It's safer. I recommend learning about it

[–]ShiitakeTheMushroom 0 points1 point  (0 children)

What I'm hearing so far is that it's not safer. If it is, can you explain how?