> I think they're supposed to be both by perl thingie and by value. So: > > my $foo is const = 0 is true; > > $foo has the property const, while the value 0 in $foo has > the property true. So, if I do my $foo is constant = new Counter(0); $foo->increment # OK my $bar = new Counter(0) is constant; $bar->increment; #error However, if I do %foo is constant = (a=>1, b=>$foo); are only the keys contant; or both the keys and values. i.e. which of these is illegal %foo{c} = 1; # error %foo{a} = 2; # probably error, but it would be nice # to have a form of hash-constness that # locks only the keys $foo{b}->increment; # OK Dave.
- properties, revisited Bryan C . Warnock
- Re: properties, revisited Dan Sugalski
- Re: properties, revisited Bryan C . Warnock
- Re: properties, revisited Bryan C . Warnock
- Re: properties, revisited Damian Conway
- Re: properties, revisited David Whipp
- Re: properties, revisited Bryan C . Warnock
- Re: properties, revisited Edward Peschko
- Re: properties, revisited Bryan C . Warnock
- Re: properties, revisited Damian Conway
- Re: properties, revisited Damian Conway
- Re: properties, revisited Damian Conway
- Re: properties, revisited Jonathan Scott Duff
- RE: properties, revisited Damian Conway
- Re: properties, revisited Dave Mitchell
- Re: properties, revisited Damian Conway