On Friday 03 August 2001 04:09 pm, Brent Dax wrote:
> # %foo is constant = (a=>1, b=>$foo);
> #
> # are only the keys contant; or both the keys and values.
>
> Keys and values, I imagine.
>
> # 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
>
> That "form of hash-constness that locks only the keys" is currently being
> discussed on p5p; it's being called clamp. So you could probably say
>
> %foo is clamped;
>
> and get that behavior.
Both arrays and hashes probably warrant something. I understood 'clamp' on
p5p in verb context, but would rather see something a little more
descriptive as an adjective.
I was originally thinking 'fixed', but that makes the distinction between
changable and non-changeable internal values nebious - which is constant and
which is fixed?
I then thought about 'resizable' That wouldn't allow the addition or
deletion of keys (or indices), but would allow the internal values to be
changed.
Today, I don't particularly care anymore.
In any case, properties will be pushed to the bottom of my stack for things
to document. There's a lot of Perl 6 contending for the bottom position, it
seems.
--
Bryan C. Warnock
[EMAIL PROTECTED]