Very interesting! I can’t help notice the parallels with rust regarding aliasing, whether something can be sent to another thread, ownership of pointers, etc. But as far as I know rust doesn’t do this with “capabilities” but its affine type system. How similar / different are the approaches? Are they the same thing with different names?
They are moderately similar – both have the same intent of allowing proven-safe reference passing between concurrent/parallel threads, although the approach is different. https://blog.acolyer.org/2016/02/17/deny-capabilities/ is a great discussion/explanation of the underlying paper which describes the pony theory and implementation.
Personally I find the pony approach cleaner and more orthogonal than rust’s, but both of them are incredibly rich and you have a lot to learn in either case anyway.
The open question for me is whether the sweet spot of explicit reference passing is big enough to warrant all the gymnastics, and whether a sufficiently smart compiler ™ might be able to perform that as an optimization on an existing immutable value-passing language. I go back and forth. The compiler doesn’t exist yet, and pony and rust do. On the other hand, erlang exists and doesn’t have those languages' sometimes-impenetrable thicket of required type annotations, and is significantly richer in its concurrency model at the moment.