On Tue, 2003-01-28 at 19:24, Paul Johnson wrote: > > If that's not the case, I need to get my head around why, since Perl > > *does* distinguish between defined and exists. > > But I wish it wouldn't for arrays. That only came about to support > pseudo-hashes which are going / have gone away. > > Are you suggesting that hashes should also have a default? That would > seem consistent and at least as useful as arrays having a default.
Yes, I would expect that. In my opinion there is no difference between an array and a hash other than the underlying storage and the type-management of the key. I'm increasingly of the opinion that a) there should be no @ vs %, there should be no {} vs [], there should be a keys, values, defined, delete, exists, push, pop, shift, unshift for every container and foreach shouldn't give a damn. But, that would be a different language, and Perl has hashes and arrays. So, the most we can do is make them not work too differently. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!