Ovid wrote:
--- On Thu, 15/10/09, Richard Hainsworth <rich...@rusrating.ru> wrote:
Later S14 has:
"There are several ways to solve method conflicts. The
first is simply to write a class method that overrides the
conflicting role methods, perhaps figuring out which role
method to call.
<snip>
Am I wrong in thinking the spec answers the question?
Reading the paper I linked to could help to clarify the issue. In short, there are times
under my current understanding of roles where you *can't* resolve the conflicts. Two
roles, each providing and dependent upon a method x(), such that if either tries to use
the other's "x()", the code will fail. Thus, you cannot choose one x() over the
other.
The paper you linked to states:
"2.2 Trait conflict resolution limits
While trait composition lets the class composer resolve conflicts by
redefining in the composer or ..."
The paper explains how conflicts arise and they are detected because
fundamentally different methods have the same name.
But the assumption in the paper is that the "class composer" resolves
the conflict, without further programmer intervention. The perl6 spec
does not require the class composer to resolve the conflict only to
detect it.
Given the explanation in the spec about conflict resolution, it is my
understanding that it is
the programmer's task to rewrite to eliminate the conflict.