[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
At 11.22 -0700 2000.01.13, Tom Christiansen wrote:
>>While I agree with this sentiment, we already crossed that bridge, I think,
>>when we decided on implementing pseudohashes. I am not saying these should
>>be extended to arrays; I think I agree that they should not be. But you
>>seem to be presenting the lines as clear, and they've already been blurred.
>
>Just because exists $hash{KEY} must work *even though that really
>happens to be a pseudohash* does not seem to this sugar-deprived
>reader to require that exists $array[INDEX] need also function.
I agree. I was just noting that the lines between arrays and hashes have
already been blurred; arguing that there is a clear distinction between the
two is not entirely persuasive, since there is not a clear distinction
anymore, aside from one uses @ and [] and one uses % and {}. For this
reason, I am not entirely pleased with the existence of pseudohashes at
all, though I think it is a clever hack. But Perl is not about purism, so
maybe it isn't that bad.
In any case, I don't think defined and exists should be extended to, as you
said, "arrays that are really being accessed as arrays." I vote No.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]