TSa wrote:
Jonathan Lang wrote:
> In short, R3 isn't neccessarily a subset of A; it's a superset of A &
> B.  In a partial ordering graph, there's no reliable ordering between
> R3 and A.
>
> The standard syntax for creating roles can't reliably produce a subset
> of an existing role, because it always allows you to add to it.

Yes, but I was conjecturing that the additions to A&B are pushed
down to A and B such that their intension sets remain strict supersets
of A&B.

I know; but as you pointed out, a single undefined method brought in
this way would break every existing class that composes A or B.

Besides, there's the principle of the matter: creating a new role
should not change the behavior of existing roles.  Admittedly, I'm
bending that rule when I suggest that A should get A&B added to its
list of roles when A&B is created; but I'm not breaking it, because
A&B won't have anything in it that A doesn't already have, and A will
uniformly override any behaviors that A&B might provide.  The _only_
thing that this change does is to let A match A&B for type-checking
purposes.  But letting R3 backend new methods into A _does_ change A's
behavior: it now has methods that it didn't used to have.  This can
lead to a more subtle version of the yadda-yadda problem that you
pointed out: if someone has a routine that depends on a failure
occurring if A.m is called, then the routine will stop working as
expected if you backend .m into A via R3.

> The only problem that might crop up is the use of 'A | B' in
> signatures to mean 'can match any of A, B' - that is: in signatures,
> 'A | B' refers to the junctive operator; while in the above proposal,
> 'A | B' refers to the set union operator.  Different semantics.

In fact if we decide to specify a role combination syntax then it
should be the same everywhere.

Agreed - but we're not talking about role combination syntax in both
places.  In signatures, we're talking about a conjunction of two
distinct roles, which is not the same as any sort of combined role
(union or intersection).  In particular, the conjunction treats each
role as an atomic unit, while unions and intersections deal with their
elements.

--
Jonathan "Dataweaver" Lang

Reply via email to