uazu / qcell

Statically-checked alternatives to RefCell and RwLock
Apache License 2.0
356 stars 22 forks source link

Evaluate GhostCell, maybe add it #1

Closed uazu closed 5 years ago

uazu commented 5 years ago

See the crate docs for the links to ghost_cell.rs. This uses lifetimes. It's not clear from the usage there how invasive the lifetime annotations would be in the code. It does offer one big advantage over TCell: no need for singletons. Apart from that the behaviour should be the same as TCell. Whether it is worth it depends on how complicated and confusing the lifetimes might be to the user.

Also, need to check licenses before copying any code from that repository.

uazu commented 5 years ago

Decided to write my own version called LCell, based on code in reddit discussion of invariant lifetimes from 2015. Included in version 0.1.2.

pythonesque commented 4 years ago

@uazu Not sure if you check Reddit, but I sent you a message there.