New Rustacean  learning The Rust Programming Language

e016: RefCells and code smells

Informações:

Sinopsis

Digging deeper on smart pointers and mutability with Cell and RefCell. Notes What are the Cell and RefCell types, and when should we use them? Today, we follow up both the detailed discussion of smart pointers in e015 and the closely related discussion in Interview 2 with Raph Levien, and look at two types you need to have a good idea how to deal with if you want to use these smart pointer types more ergonomically—that is, how to use them without feeling like you’re beating your head against a wall! Links Rust 1.10 blog post full release notes cdylib RFC: text | discussion implementation rustup 0.3.0 release Integer32 (Carol Nichols’ and Jake Goulding’s new Rust consultancy) announcement blog post reddit discussion IntelliJ Rust reddit discussion Tango: source | talk Cell and RefCell: Cell Types in The Rust Programming Language Standard library: std::cell module docs (detailed explanation, complementary to the book) Cell<T> docs (at std::cell::Cell) RefCell<T> docs (at stc::cell::RefCel