Re:What Rust Can Do That Other Languages Can't
by tatterdemalion on Monday February 06, 2017 @04:00AM
(#13577743)
You've missed a critical point in the article: the structure does not have a pointer to something it has a member inline within its stack representation.
Any garbage collector could (with some overhead) prevent invalid memory access when we're talking about an object with a pointer to another object. Rust is able to validate the correctness of pointers to offsets within the stack representation of an object.
(Rust also validates the correctness of references to heap allocated objects as well, of course!)
Any garbage collector could (with some overhead) prevent invalid memory access when we're talking about an object with a pointer to another object. Rust is able to validate the correctness of pointers to offsets within the stack representation of an object.
(Rust also validates the correctness of references to heap allocated objects as well, of course!)