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

RE: [PATCH for discussion] new feature: clamp %hash

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
July 25, 2001 05:40
Subject:
RE: [PATCH for discussion] new feature: clamp %hash
Message ID:
20010725124037.1658.2@bactrian.ni-s.u-net.com
Jeffrey Friedl <jfriedl@yahoo.com> writes:
>Nick Ing-Simmons <nick@ing-simmons.net> wrote:
>|> readonly \%hash;     # clamped
>
>I reiterate that I believe that this would be a mistake.

to which I reiterate that that was pseudo code example of the 
implementation - not an interface definition.
I was trying to demonstrate that with "hooks" e.g. by readonl() xsub,
and minor tweaks to the core adding some "dies" we can implement both.

I leave it up to list as a whole to discuss what it should look like
to user.

>
>If you want readonlyness for a hash to mean that its values are also
>readonly (which, Nick, you made abundantly clear that you do), then
>how can it be anything but a misnomer and trap that
>   readonly \%hash;
>not do that?
>
>As I and Scott have said, and to which you agreed, clamping and
>readonlyness are different animals. Shouldn't the way to invoke them,
>therefore, also be different? That they may be internally dealt with in
>similar manners is not something the user needs to be confused by.

I have no objection to the concepts - I was critical of the implementation.

If we can come up with an interface which does not confuse the user,
and which is implemented by a module with only minimal changes to the 
core then this is 5.8.* worthy. 



>
>	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