17 karma · joined Sep 2, 2014 (12y ago) · 8 submissions
comment 10y ago · link · parent
Tracking a semantic error in a call that's three calls away from where your unsafe block lives is much easier and structured than going through everything everywhere for any error from anything.
(I haven't done much work at all in Rust and avoid `unsafe` - and `mut` and `.unwrap`, for that matter - like the plague when I do use it, so I'm very open to being wrong in my interpretation.)
EDIT: I also think a reasonable comparison would be Haskell's `do` blocks. It's guaranteed that anything with side effects will live in a `do` block, but of course you can still have semantic errors. Again, you know exactly the "functions of interest" to look at if this is the case - there's no chance of `someFunc1` to be doing anything funny if it's never called by anything in the `do` block.
comment 10y ago · link · parent
comment 11y ago · link · parent
Also, the code at http://aka.ms/scspostercode is nice.
comment 11y ago · link · parent
[1] http://en.wikipedia.org/wiki/Symbolic_link#Microsoft_Windows