On 2/15/06, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> On 2/14/06, Stevan Little <[EMAIL PROTECTED]> wrote:
> > I think that the metaclass (stored in the pseudo-lexical $::CLASS)
> > should create a number of anonymous roles on the fly:
> >
> >    role {
> >         multi method a (::CLASS $self) { ... }
> >         multi method a (::CLASS $self, Scalar $value) { ... }
> >    }
> >
> >    role {
> >         multi method a (::CLASS $self) { ... }
> >         multi method a (::CLASS $self, Array @value) { ... }
> >    }
> >
> > These roles would then be added to the metaclass using the normal
> > rules of role composition. (NOTE: I assume that ::CLASS is unbound
> > until the role is composed into a class, I think A12 might have stated
> > this detail)
> >
> > Now obviously we have a conflict in our multi-methods. S12 only states
> > that multi methods will be compared by their long names (name +
> > signature) to resolve ambiguity, it does not state what happens when
> > those long names conflict. I propose that they work just as normal
> > method conflicts do, which is that both methods are excluded and the
> > consuming class is then required to implement that method.
>
> Is it just the first multimethod a(::CLASS $self) from each role being
> excluded or are all the multimethod a(...)'s being excluded?

I would think it could be the first one only, the one where the long
name conflicts.

Stevan

Reply via email to