[cap-talk] designing new language.
capibara at xs4all.nl
Sat Aug 13 00:50:54 PDT 2011
On Sat, August 13, 2011 07:34, David Nicol wrote:
> On Fri, Aug 12, 2011 at 6:29 PM, Rob Meijer <capibara at xs4all.nl> wrote:
> 7) Basically uses 'move' semantics by default, and a resource management
>> system that builds on that. 'shared' references should be the special
> what are 'move' semantics? Are shared references okay if the references to
> them are opaque?
What I meant is that shared references are OK but should not be less
trouble than full transfer (move). If we have two active objects, Alice
and Bob than if Alice has a reference to Carol and uses this reference in
a message to Bob, than, there are two options:
A) Alice and Bob end up both having a reference to Carol
B) Handing Carol to Bob effectively revokes Alice her access to Carol.
Both should be possible, but with B being the state with the least
sharing, B should be easier or at least just as easy to express as A.
The same goes the other way. Now assume synchronous operations or some
other kind of possibly promise based 'return' scenario. If Bob has a
reference to Carol and returns this reference as a result of being
invoked, than again there are two options:
C) Alice and Bob end up both having a reference to Carol
D) Returning Carol to Alice effectively revokes Bob his access to Carol.
Again both should be possible, but with D being the state with the least
sharing, D should be easier or at least just as easy to express as C.
Hope this makes sense.
More information about the cap-talk