Re:Getting Past C
by afarrell on Tuesday January 03, 2017 @05:25PM
(#13313760)
Is the use of the unsafe keyword a default? I don't know Rust, but from a user interface perspective, it sounds like it has an affordance of "Hey! Pay particular attention to this bit because it is risky!"
[ Parent
| on HN ]
Re:Getting Past C
by Manishearth on Tuesday January 03, 2017 @06:25PM
(#13314258)
It's more of a "Hey, trust me here when I say that the enclosed code is actually safe" hint to the compiler.
It's used sparingly. Not as sparingly as I'd like, but sparingly enough.
Sure, but code is not just instructions to a compiler, but is also a user interface.
Re:Getting Past C
by Manishearth on Tuesday January 03, 2017 @07:11PM
(#13314531)
Oh, yes, as a UI it is "be extremely wary of this code" Often folks write long comments around unsafe code explaining why it is safe. Not always, sadly.
Re:Getting Past C
by steveklabnik on Tuesday January 03, 2017 @05:34PM
(#13313836)
It is very much not the default.