Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dexterlemmer
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
dexterlemmer
6y ago
In C the program implicitly assumes there won't be an invalid file name or such thing. If the assumption turns out to be wrong, something unexpected (which may or may not be a memory bug) happens. In Rust the program explicitly expects
32.
▲
by
dexterlemmer
6y ago
Iterators do indeed not force the removal of bounds check, but that's simply because they don't exist to remove in the first place. That's because iterators actually do use `unsafe` internally. They are a safe abstraction.