r/ProgrammingLanguages • u/RndmPrsn11 • Oct 19 '26
Borrow Checking Zero-Cost Cyclic Mutability
https://antelang.org/blog/safe_cyclic_mutability/
34
Upvotes
r/ProgrammingLanguages • u/RndmPrsn11 • Oct 19 '26
View all comments
Show parent comment
1
u/initial-algebra Oct 19 '26 edited Oct 19 '26
Maybe those ones aren't "hacky" per se, but reasoning about "when can a
p!exist" and "when canpbe mutated" in terms of sets of program points that must be disjoint (and then making the leap to abstraction over sets of program points) is a unifying semantic principle vs. having ad-hoc syntactic rules for those constructs.Currently, you could infer
Stabilize pfrom the mention ofp!, but, in general, a function would still need to mentionStabilize peven if it only ever creates and usesp!references internally, to prevent a concurrentMutate pfrom existing.Yes, but the point of reframing stability as immutability of a special field is to generalize to immutability for other purposes, such as multi-threading.