Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cousin_it
on Dec 1, 2016
|
parent
|
context
|
favorite
| on:
Zero Cost Abstractions
>
On the other hand, the Rust code is guaranteed at compile time to be free from buffer overruns
No it's not. In this line:
.zip(&buffer[i - 12..i])
you can just put any indices and it will compile.
yberreby
on Dec 1, 2016
[–]
But it will not read outside of the buffer. It will panic at runtime instead. That's not a buffer overrun.
AnimalMuppet
on Dec 1, 2016
|
parent
[–]
It's still an error discovered at runtime. It's one that smacks you in the face instead of silently doing the wrong thing, but it's still found at runtime. I really prefer my errors to be found at compile time, but that's often harder to do...
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
No it's not. In this line:
you can just put any indices and it will compile.