TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:

"Candidate set" would be a better term. It is a subset of all long names
of a multi in a lexical scope.

List, not set, because it is ordered. nextsame/nextwith/etc. are described as invoking the next candidate on the list. Therefore, there is a list.



What about ordinary methods (and ordinary parameters of multis)?
Does the candidate list hold every method name that matches, or does
it do simpler parameter matching based on number of arguments,
required named arguments, etc.?

There is hopefully a complete specification what constitutes
applicability. There can hardly be differing simpler versions.
In other words there is only one subtype relation that is used
whenever a binding takes place.

I have no idea what you said.



If that is the case, then a derived method might not hide a base
class method if the parameter list is seriously incompatible.

That is a natural and welcome consequence of type based dispatch.
Classes are for implementation sharing, not for transitive typing.

I'm talking about non-multi's here.


 More
interestingly, left-to-right ordering of multiply-inherited base
classes will be checked for applicability rather than  arbitrarily
taking the leftmost.

Indeed, I would hope that order of inheritance doesn't matter.
Sounds more role-like, now that you mention it.




Regards, TSa.

Reply via email to