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
3
u/tmzem May 02 '26
Thanks for this reply, lots of interesting points. Could you explain these a bit further?
Using indices into a collection is also used by ParaSail language. While this works well with array-based collections, I wonder how well (performant) it would word with Tree-based collection like BTreeMap's where accessing and index inside a loop would require (the often same) chain of dereferences.
Also I wonder how you would easily represent lazy algorithms which are usually modeled with iterator adapters that hold references internally (map, filter, zip), and how index-based access would make APIs cleaner given that you'd have to pass/thread the collection explicitly. Could you give an example?
How could one implement the ArraySlice<E> type mentioned in the Language Tour's Concurrency section without remote parts?