Re: Capture Object: why no verb?

2006-04-22 Thread Dave Whipp
Audrey Tang wrote: Hm, Perl 6 actually has two different ways of putting Capture to some Code object... Following yesterday's P6AST draft I'll call them Call and Apply respectively: moose($obj: 1, 2); # this is Call moose.($obj: 1, 2); # this is Apply elk(named =

Re: Capture Object: why no verb?

2006-04-22 Thread Audrey Tang
Dave Whipp wrote: Also, I'm a bit confused By the idea that the invocant is obtained by a scalar dereference, because I know that arrays and hashes can be invocants, too. E.g. @a.pop. So, If I do: my $args = \(@a:); my $b = $$args; # @a as a scalar my @c = @$args; # empty list

Capture Object: why no verb?

2006-04-17 Thread Dave Whipp
Reading about capture objects, I see that they represent an arglist, and the the object to which you going to send those args. What is doesn't capture is the method name (the verb) that's being called. This feels like a slightly strange ommission. Compare: $message = Shape::draw.prebind(

Re: Capture Object: why no verb?

2006-04-17 Thread Audrey Tang
Dave Whipp wrote: Perhaps I'm not fully groking the abstraction of the capture-object, but it seems to me that there should be a slot in it for the method. For dispatch, all three things are needed (invocant, method, args); so if you're going to put two of them in one object, then maybe the