On Thu, Nov 30, 2006 at 09:13:42 -0800, Larry Wall wrote:
> my $x = 42;
> &f := sub {
> have $.x;
> say $x;
> ...
> }
> say &f.x;
hmm... That looks nice.
Maybe even this makes sense:
sub {
have $.x;
method blah { }
If I follow what you're saying (and this is by no means a certainty :)
I would tend to look more for a declarative solution than a callback
solution, so I'm imagining that any closure could have a declarator
that explicitly captures an outside lexical and makes it available
as an attribute. I don'
Hi,
I think a partial unification of objects and code refs in userspace
is going to be a nice features.
Closures allow people to put arbitrary complexity into a very simple
api that is, in OO terms, just one method (the actual function
call).
Consequentially the closure may never reveal any info