Ruud H.G. van Tol wrote:
Larry Wall schreef:
> I suspect ordered composition is going to be rare enough that we can
> simply dehuffmanize it to
>
> $x does A;
> $x does B;
> $x does C;
Maybe use a list-like notation?
What happens when you try to mix ordered and unordered composition?
Under the current syntax, to compose roles A and B together, and then
C once A and B are done, one could say:
$x does A | B does C;
Under my original suggestion, this would be:
$x does A does B & does C;
Under Larry's suggestion, this would be:
$x does A does B;
$x does C;
How would you handle it?
If ordered composition is something that can be done in a single
statement, then unordered composition syntax needs to be nestable
inside ordered composition syntax - and since the goal here is to have
"does A does B" always represent unordered composition, that's what
would need to nest.
--
Despite having suggested a possible syntax for ordered composition, I
think that Larry is right in claiming that a sequence of separate
composition statements is more than sufficient in both syntax and
clarity to handle those cases where ordered composition is needed.
--
Jonathan "Dataweaver" Lang