Luke Palmer wrote:
    My brother asked me to take out the trash.  I asked him to do it.

I believe that the subject there is "my brother" in the first sentence
and "I" in the second.  The topic is either "to take out the trash" or
just "the trash" throughout (English speakers wouldn't have any trouble
allowing it to be both).

Let me translate that to my understanding of Perl6:

method Brother::ask( $object ) # $?SELF .does Brother
{
   $_ = "please, take out the trash."; # definition of it
   $object.ask; # invocant asks object to do it
}
method ask # $?SELF .does Any
{
   caller.ask; # invocant asks caller to do it (or is the syntax 
caller.self.ask?)
}

my Brother $brother; # declaration needed to dispatch to &Brother::ask

$brother.ask( $luke ); # brother asks luke to take out the trash

At runtime the call chain either runs into an "undefined object error"
in the second invocation of &Brother::ask or an endless loop of
invocations of the second method is spawned with alternating callers.

Or, I'm off-topic ;)

PS: We all know that trash doesn't take itself out.
    So, $_.ask is pointless :)
--
TSa (Thomas SandlaÃ)





Reply via email to