r/ProgrammingLanguages • u/FedericoBruzzone • Apr 30 '26
The Mutable Value Semantics (MVS): A Non-superficial Study
I’m researching a new semantics for a new language. During this process, I studied the Mutable Value Semantics (MVS) and I wrote a post about it. I simply want to share this study with you all and I'd love to hear your thoughts.
A new post will be coming soon where I'll discuss the limitations I’m finding in current models, and what I’d like to have for my own.
28
Upvotes
View all comments
Show parent comment
1
u/dabrahams May 04 '26
Sink doesn't necessarily imply a move; it's just value consumption. You use it on a parameter when you're going to store or return the value… you don't have to of course, but with an ordinary by-value (let) parameter you would have to explicitly copy the value to store it. Or if you don't care about being alerted to the cost of copying, you can use some variant of our
@implicitcopydirective to avoid thinking about copies and let the compiler do it.