Damian Conway <[EMAIL PROTECTED]> wrote
> > > > my $a is true = 0; # variable property
> > > > my $a = 0 is true; # variable property
> > > > my ($a) = 0 is true; # value property
> > >
> > > Wow. Totally ETOOCONFUSING.
> >
> > That has been exactly my thought as I have been reading this thread.
>
> Actually I think the original is wrong. I would have said:
>
> my $a is true = 0; # variable property
> my $a = 0 is true; # value property
> my ($a) = 0 is true; # value property
Interestingly, one of Larry's earlier examples had it the 'wrong' way
round too. $ETOOCONFUSING++ ?
Perhaps rather than having a variable/value distinction, we should just
state whether a property is preserved over assigns etc, eg
my $a is true = 0; # $a is true
$a = 0; # $a is now false
my $a is sticky true = 0; # $a is true
$a = 0; # $a is still true
my $b is sticky false = 0;
my $a is sticky true = $b; # $a is true, since lh stickiness overrides
# rh stickiness
As a slight aside, the 'true' property seems slightly confusing. is there
a corresponding 'false' propety, which is set, deletes any 'true' propery
and vice-versa? Or should we just have a bool property?
return 0 is bool(1);
return "foo" is bool(0);