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

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

Thread Previous | Thread Next
From:
Jeffrey Friedl
Date:
July 20, 2001 16:26
Subject:
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
200107202326.QAA04359@ventrue.corp.yahoo.com

|> Well, there are tradeoffs to his proposal, and they should at least be
|> mentioned.....

Sorry for the self-followup, but one overridingly important issue I forgot
to mention is that the semantics of marking an HV "readonly" can be quite
different than the marking of its individual values.

After

    my $ref = \$hash{SOMEKEY};
    somehow_mark_readonly %hash;

it is clear that
	$hash{SOMEKEY} = 3;
should not be allowed, but what about
	$$ref = 3;
?

I can imagine convincing arguments for semantics that do and don't
allow updates via the reference.

	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