Hacker News new | past | comments | ask | show | jobs | submit login

> 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.



But it will not read outside of the buffer. It will panic at runtime instead. That's not a buffer overrun.


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: