News for hackers. Stuff that matters.
Re:Getting Past C by leshow on Wednesday January 04, 2017 @10:10AM (#13318830)
Do you know what a panic is?

C will actually read arbitrary memory, Rust won't, that's the difference.

We're talking about a situation where the length of the array is not statically known and you access it out of bounds at runtime. Rust checks first if it's out of bounds, and if it is, DOES NOT blindly read the memory anyway (as C would) but exits.

I don't understand how you could think the two situations are at all equivalent.

There are no comments on this comment yet.