Do you often find yourself using interior mutability in Rust? I have pretty much never *needed* it in recent years. In the few cases I have, it's turned out that I actually wanted to use atomics instead.
I'm curious to see if using interior mutability is common or not. #rustlang
-
-
Replying to @Sunjay03
yes, because i have to deal with shared (Rc, Arc, and also GC'd) ownership situations a lot. interior mutability is basically the only option there also with things like graph datastructures, if you stick things in a petgraph you need interior mutability
1 reply 0 retweets 6 likes -
Replying to @ManishEarth
Yeah trees and graphs are the main places I've had to use that too. That being said, I'm lucky enough to be able to keep those trees immutable in most cases though, so I actually end up only using Rc and not needing RefCell or whatever at all.
1 reply 0 retweets 5 likes -
Replying to @Sunjay03 @ManishEarth
Luckily our children won't have to deal with this, since there likely won't be any trees left in a few decades. Which will also mean no more graphs without paper to print them on.
3 replies 1 retweet 10 likes -
Replying to @sgrif @ManishEarth
Child, learning programming: Why are these data structures called trees? Us: because when you think about how the world used to be you suddenly really feel like smoking some trees
2 replies 0 retweets 7 likes
Talking to my niece and nephew makes me feel old fast. Ethernet is called "wifi cables". They have no clue what the save icon is. They never lived pre-ACPI and didn't understand how shutdown and power off could be separate steps
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.