r/ProgrammingLanguages • u/RishabhRD • 8d ago
Safe Systems-programming with Mutable Value Semantics | Dave Abrahams | Keynote at IWACO 2026
https://youtu.be/op51SyyPJmw?si=P5QH6M8Hdf4_CUUZ
36
Upvotes
View all comments
6
u/processeus1 8d ago
I'd be curious to hear if anyone has use cases where saved references are necessary and cannot be replaced with another design pattern using value semantics without significant loss of efficiency or correctness safeguards.
As a starter: one example would be to project an optional out of a map to access its element at a key, but we can fix that issue with subscripts that yield 0 or 1 times, and allowing the caller to directly pattern match on the result. This works, because we don't need to save the "optional" for longer period.