Damian Conway wrote:
This is a much less dwimmy solution than Yuval's or Luke's, but it has the
advantage that those eight steps reduce to eight words:

    Unique least-inherited most-specialized match, or default

Do I read this correctly as dispatching partly in the class hierarchy
and partly in the type hierarchy? Or do you mean with 'least-inherited'
most specific non-where type and with 'most-specialized' the strictest
where clause? To me these two concepts are the same if you think of the
does operator as a predicate:

multi sub foo ($x where { $x.does(Num) }) {...}

beeing the same as

multi sub foo (Num $x) {...}
--
TSa (Thomas Sandlaß)


Reply via email to