develooper Front page | perl.perl5.porters | Postings from October 2001

Re: [PATCH] core-only patch for clamp/readonly hashes

Thread Previous | Thread Next
From:
Jeffrey Friedl
Date:
October 30, 2001 15:05
Subject:
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
200110302304.f9UN4sc90316@ventrue.corp.yahoo.com

|> > It's beginning to look like Jeffrey's patch is pretty much exactly
|> > what we all have in mind...?
|> 
|> I have not seen the alleged "core only patch".

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-10/msg01305.html

It seems that the list is acting up today.
(Also, I've not been CC'd on some replies, which compounds the problem)

|> IMHO I would still rather keys returned the allowed set - it is useful,
|> and avoids the overhead of maintaining the "realkeys" count (even if we
|> can re-use the NV as has apparently been done).

As I mentioned in one (probably lost) message, I've figured out a way to
maintain the "realkeys" w/o any overhead in the normal case. I didn't send
a patch because I don't want to flood the list with patches while basic
semantics are still being discussed (even though I thought that the basic
semantics were fairly well hashed out during the short thread in August).

One important concept is that if a key doesn't exist, exists() should
return false. It may be allowed, but that doesn't mean it exists().
Hopefully, everyone can agree with this.

I feel that scalar(keys()) should return the same number of items that keys()
returns, just as it does now.

I would feel that keys() should return only keys that exist(), just as it
does now.

It would be nice to get a list of allowed keys, or perhaps keys that are
allowed but don't currently exists. These functions could be left up to the
XS module.

The overall functionality I think is *useful* is that you can tell a hash
``Here are the keys that are allowed -- so long as keys are always from
this list, do whatever you want''. The approach I've taken implements this
with virtually no cost.


At this point, I'm fairly confused as to who thinks what, due to the
misordering of messages, lost messages, etc. Maybe things will resync
tomorrow. Until then, from what I've seen so far, I still feel that the patch

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-10/msg01305.html

pretty much does what most people are asking for (although I would like to
make the small implementation change I mentioned above).

        Jeffrey

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About