On Sun, 13 Oct 2002, Trey Harris wrote:
: I was going to say the same thing, but then I remembered that Perl 6
: methods, unlike the sub 'methods' in Perl 5, won't get the invocant as the
: first real argument--it will be the topic instead.  And I don't think you
: can do multiple-dispatch on topic, can you?

The topic *is* the first real argument.  It's just that you aren't
required to name the first argument.  Whether an argument has a
name or not is somewhat independent of whether it can participate
in multiple dispatch.  It might be convenient for the argument to
have a type, however.

The use of an implicit invocant should not be confused with out-of-band
topicalization.  That's a mechanism for binding the outer topic to a
formal parameter that is not necessarily the inner topic.

Larry

Reply via email to