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

Re: restricted hashes, and other readonlyness (was "clamp...")

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
November 3, 2001 10:57
Subject:
Re: restricted hashes, and other readonlyness (was "clamp...")
Message ID:
20011103185734.664.12@bactrian.ni-s.u-net.com
Jeffrey Friedl <jfriedl@yahoo.com> writes:
>Nick Ing-Simmons <nick@ing-simmons.net> wrote:
>|> I would like concrete examples of places where delete-ing keys is 
>|> vital to the application.
>
>You really can't imagine an object that is intended to be used with a fixed
>universe of keys, yet one whose actual membership set within that universe
>is dynamic?

A. I cannot actually think of one where setting value to undef would 
   not suffice.
B. What I can 'imagine' isn't really interesting - I don't want to 
   solve imaginary problems, but real ones.

>
>A sort grep through some common libraries quickly yields a few
>likely candidates:
>      the various IO::Socket objects

There are only two occurances of 'delete' in those - and in both cases
the hash in question seems to be the creation arg list - not the 
object - the caller is unlikely to have restricted the arg list for us ...

>      Net::FTP object

A possible - Graham care to comment?

>      ExtUtils::MakeMaker

MakeMaker's object hashes are a law unto themselves, I know _my_ 
Makefile.PL's abuse them for all sorts of junk...

>      the param has in CGI.pm
>      the Pod.pm object
>
>|> But if you can get the compromise "seconded" by other people - then a
>|> slightly cleaned up version is possible candidate for 5.8.
>
>Mmmm, I thought that's what most others in this thread have been doing.
>      Jeffrey




-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


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