News for hackers. Stuff that matters.
Re:Rust: Box Is a Unique Type by saghm on Thursday May 02, 2024 @05:08PM (#40241386)
> This is why I firmly argue (and pretend) that references are not pointers. "References are pointers" results in the belief that references will behave like C pointers and results in things like this article.

This is my usual mental model as well. My thinking is that if tomorrow a new Rust version came out that used some other magical implementation of references that didn't use pointers under the hood, my code should still be correct. Maybe converting between references and raw pointers would be less efficient, but the semantics of my code shouldn't change.

There are no comments on this comment yet.