Juerd writes:
> Ingo Blechschmidt skribis 2005-04-23 19:42 (+0200):
> > BTW, is it possible to implement the Proxy class in pure Perl? (I don't
> > think so.)
>
> It would have to be possible, because Perl 6 will be written in Perl 6.
>
> (I like that Perl 6 will be written in Perl 6, because as
Ingo Blechschmidt skribis 2005-04-23 19:42 (+0200):
> BTW, is it possible to implement the Proxy class in pure Perl? (I don't
> think so.)
It would have to be possible, because Perl 6 will be written in Perl 6.
(I like that Perl 6 will be written in Perl 6, because as Perl 6 is very
fast, Perl 6
Hi,
my $x = new Proxy: FETCH => { foo() }, STORE => { bar($^new) };
$x ~~ Proxy; # true
$x = 42; # neither foo nor bar called
$x ~~ Num; # true
my $y := new Proxy: FETCH => { foo() }, STORE => { bar($^new) };
$y ~~ Proxy; # false (unless foo returns a Proxy object)
$y = 42;