@GreenTeaCoding

To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/GreenTeaCoding/ . You’ll also get 20% off an annual premium subscription.

@RolandHaller

Super interesting to explore the implementation of standard with commentary. Thanks!

@tigrux

I have watched only one video and that alone was enough to subscribe.

@kfjfdskfjdsf1211

Came here for RefCell, stayed for that caching implementation

@tommy_1446

There are 4 desirable guarantees that can't exist at the same time. You always need to give up one:
    1. Thread safety - (given up by &Cell, &RefCell, Javascript)
    2. Synchronization free - (given up by &Mutex, Python)
    3. Mutability - (given up by &T, Haskell)
    4. Memory Safety - (given up by *mut T, C++)
    5. Aliasing (given up by &mut T, Fortran)
Rust gives these guarantees up on a per object basis, while other languages give them up entirely for simplicity.

@Erotemic

There is a distracting ringing in the audio whenever speaking occurs. Is it possible to fix the audio in the video?

@MrLeeFergusson

Great vid RefCell is one of my Rust "white whales" to wrap my head around this helped.

@asdfmonstrosity

Thank you! You're quite good at convincing me not to learn rust. So much complexity and layering and working around its own rules

@AK-vx4dy

It is like Do in Haskell, without it is hard or impossible to implement some algorithms or data structures but also may be tempting to programers coming from other languages to do things "old ways"

@Darfeld

I understand that this is for exemple purpose but I have to say:
It bother me that your "get" function, that by your own words should be immutable, actually mutate the content of CachedComputation since it insert an entry into its HashMap if the input doesn't exist. In this case it seems the RefCel is used to hide this mutability. I guess you could argue that this function doesn't mutate anything already inside the hashmap,

@ClimateChangeDoesntBargain

arc mutex screaming