Comment

Comment by jrvidal

> The nice thing is that RefCell is not magic

I'd like to point out that `RefCell` does contain a bit of magic, since it is based on `UnsafeCell`, which is _the_ core "primitive" of Rust that enables interior mutability:

https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html

(Not trying to be pedantic, just to clarify things for less knowledgeable readers).

parent jrvidal 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton