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

There's no disagreement. OskarS is just plain wrong and now backpedaling. They specifically said that:

>Having a raw pointer and having an index into an array are essentially equivalent, and doing this in Rust is a way to turn off the borrow checker for this particular object. [...] The index is bounds-checked, sure, but lifetime issues like “double free” or “use after free” are every bit as present with indexes. For instance, if you have an index in one place, but it’s deleted and/or reinitialized to some other place, you are now holding on to an object in an undefined state. Using it will cause the same issues “use-after-free” does in C.

... which is false. Later they shifted the goalposts to:

>If you use that function, and you've held on to a an index that is no longer valid, it is pointing to the wrong string. Or worse: it's pointing outside of the array, and your program will panic.

... which nobody would've disputed if they'd said that initially.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: