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

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

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
November 1, 2001 05:04
Subject:
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
20011101130421.L6756@plum.flirble.org
On Thu, Nov 01, 2001 at 12:50:43PM +0000, Nick Ing-Simmons wrote:
> Graham Barr <gbarr@mutatus.co.uk> writes:
> >So why make exists an exception to the rule ? Surly people can mistype
> >the element name passed to exists just as easily.
> 
> My view is that exists isn't a special case - I said:
> 
>  >exists $hash{baz};  # error - not an allowed key

Don't we want enough flexibility (and flags) to allow both behaviours?

If exists is a warning on not allowed keys then passing a reference to one
of these restricted hashes into older code not specifically expecting one
could start making warnings appear which cry wolf.

But if exists is not a warning then typos will be missed.

Nicholas Clark

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