5 ms·
> If data structures require unsafe operations, doesn't this make Rust's safety a 90/10 solution, and leave a small but credible threat of what are effectively
by pcwalton 10y ago
> If data structures require unsafe operations, doesn't this make Rust's safety a 90/10 solution, and leave a small but credible threat of what are effectively buffer overflow attacks?
No worse than JavaScript, Perl, PHP, Python, Ruby, Go, ..., all of which implement their hash tables in C.
How many production server side apps do you know of that have been compromised due to memory safety problems in the core hash table data structure?
- geodel 10y agoGo's implementation is in Go + may be some assembly.
- yberreby 10y agoThat doesn't make it immune to memory unsafety, because the initial implementation had to be written in something other than Go, namely C. And the current compiler was compiled by an older compiler, which was itself compiled by an older one, ..., which was itself compiled by the initial Go compiler, written in C.