Front page | perl.perl5.porters |
Postings from January 2000
Re: On Pseudohashes
From:
Dan Sugalski
Date:
January 14, 2000 12:12
Subject:
Re: On Pseudohashes
Message ID:
4.3.0.25.20000114151207.01a5e340@24.8.96.48
At 02:54 PM 1/14/00 -0500, Ilya Zakharevich wrote:
>Tom Christiansen writes:
> > What are their real problems? I think for many of you, their biggest
> > problem is that they expose their underlying implementation as mere
> > arrays to the programmer's prying eyes. They further clutter
> > themselves by placing details of their internal structure right
> > there for all to see by keeping their valid field names in their
> > zeroth element.
>
>Exhibitionism was always Perl's way of living. I think most people
>hate is not the fact of exhibiting internals, but the choice of zeroth
>element to keep these pesky guys.
>
>2/3 seriously: what if we keep them at $array[-1]:
5/8 seriously: How about $array[undef]? Means smacking things around a bit
so that the undef's not taken in strictly numeric context (and so ending up
a zero), but if we do it, it has the advantage of backwards compatibility
with the 5.005 version of pseudohashes.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk