On Thu, Nov 9, 2023 at 9:41 AM Mark S. Miller <
eri...@gmail.com> wrote:
>
>
>
> On Thu, Nov 9, 2023 at 12:10 AM Matt Rice <
rat...@gmail.com> wrote:
>>
>> Given the comparison to "ownership types", which generally have some
>> subset of the substructural rules e.g. Weakening, Exchange,
>> Contraction.
>> It might be interesting to try and fit these within the framework of
>> substructural rules/logic, I don't have a great understanding of your
>> Ownables having just read your PR description.
>> But if I squint hard enough, I somewhat wonder if it couldn't be more
>> related to the relatively rare "ordered type" which discards all the
>> substructural rules.
>> I personally think they are interesting from a capability perspective.
>> At this point I must ask whether there is any resemblance of this
>> two-phase lifecycle that resembles a stack?
>> E.g. is the notion of two-phase representing a particularly small
>> stack of bounded size (1?)? Anyhow these are the things I wonder
>> about, I don't expect there are any particularly easily obtained
>> answers for them, but I still feel they are worth wondering about.
>
>
> Frankly I did not follow most of that. I'm still an amateur on fancy static type systems. ELI5 ?
I will try, however I'm particularly terrible at explaining much of anything.
let me refer to the rules themselves:
https://en.wikipedia.org/wiki/Structural_rule
and the table of type systems systems built upon them...
https://en.wikipedia.org/wiki/Substructural_type_system
>
> The most fundamental reason for alternating between the phases is that the invitation form is the one to offer for sale or try to buy. It must have a description of the right in a quiescent state, so the right must not be exercisable while a redeemable invitation for that right continues to be unredeemed.
This resource based analogy is apt, part of my question (the pure
speculation part about ordered systems) is largely curiosity I think
it is probably not the case (however from the table there aren't that
many substructural systems for those following the common rules and
you had eliminated half the others, hence my curiosity.)
The general analogy for substructure type systems is also that of
resource usage where the.
Ordered correlates to a stack, that is in a stack only ever access the
top of the stack.
Linear correlates to a heap (you can access any variable on the heap)
these are the common resource analogies for substructural systems, I
will
try and relate your house analogy back to these.
> A comparison I like is the difference (normally) between a house as lived in and a house as offered for sale. If the house remains quiescent between inspections and purchase, then the buyer is more likely to be willing to rely on the inspection. This also emphasizes the difference between use-value vs transferable-value. While I'm living in the house, part of its value to me rests in having all my stuff scattered around in ways adapted to my habits. When I put the house up for sale, I first remove all those things, move out, and let the inspectors in. I remove the subsidiary my stuff typically not to deny their value to the buyer, but because their value is besides the point of what the buyer is normally interested in.
This in particular sounds to me like perhaps like switching between
the presence and absence of the weaking (first link) rule. With the
weakening rule present in the case of a use-value. And absent in the
case of a transferable-value. This rule in particular describes
whether it is a valid rule of inference such that if we consider your
house to be gamma.
let epilon imply it being either a use-value or transferable-value
and your stuff A. In the case of a use-value we are saying that being
a use-value still holds if we add your stuff to the environment.
In the case of a transferable-value, adding your stuff to the
environment is not a valid rule for epsilon to still hold.
Presumably contraction does not hold for transferable-values. Say your
house is made of bricks, the contraction rule when given 2 bricks,
would allow you to remove one.
Because well they are both bricks, and there is still one left.
The Exchange rule we haven't really discussed in any way I can tell.
It is the rule that distinguishes an Ordered from the Linear type,
where it is allowed in a linear type
but disallowed in an ordered one. Its absence in an ordered type
system is what creates the stack-like use in order.
Without it you cannot reorder elements A, B -> B, A. Thus the head of
the stack must be used first.
In an actual physical real-estate analogy exchange certainly matters,
reordering the roof with the floor is likely to void any inspection
that made it tranferable.
But I'm uncertain whether this is a property of the analogy that
translates directly to a property of your owned objects.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/cap-talk/CAK5yZYjnu7SXE-DB9mk%2BE85YohQfbDbjF9WQbci5k8qXp%3DK9GQ%40mail.gmail.com.