develooper Front page | perl.perl5.porters | Postings from March 2003

pseudohashes deprecation

Thread Next
From:
Jarkko Hietaniemi
Date:
March 9, 2003 23:26
Subject:
pseudohashes deprecation
Message ID:
20030310072611.GM27669@kosh.hut.fi
I think the thread sort of died ... but I seem to remember seeing some
discussion about the deprecation (or not) of pseudohashes (and if, how).
Since I'm starting to ramp up for 5.8.1-RC1, I really would like to know
what is the general feeling about the matter.

What currently happens in maintperl is that if one accesses the
pseudohash constructs, one gets a warning:

	$ ./perl -wle '$a=[{foo=>1,bar=>2},12,34];print $a->{bar}'
	Pseudo-hashes are deprecated at -e line 1.
	34
	$ 

Creation of pseudohashes does not warn since that's one of the major
gripes about the whole feature: if you *do* want to create a data
structure that has the same structure as a pseudohash (would) but do
*not* want Perl to interpret it as a pseudohash.  (Not that for
5.8.1 it helps that much: Perl still does implement pseudohashes.)

Also remember that the 5.8.0 didn't have this deprecation warning and
this was considered an oversight: a feature shouldn't be deprecated
without an added warning (not all people read perldelta as carefully
as they should).  Hence the added warning for 5.8.1.

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

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