News for hackers. Stuff that matters.
Re:Ask HN: Why aren't modern programming languages, like Rus... by zelphirkalt on Monday July 03, 2023 @04:08AM (#36570153)
> Do I need a &mut Option<Thing>, or an Option<&mut Thing>?

That depends on what you want. Do you want the address to a mutable Option of a Thing, or do you want an Option of an address of a mutable Thing? The mental model you have of your code should make this rather clear.

There are no comments on this comment yet.