develooper Front page | perl.perl5.porters | Postings from January 2000

Re: On Pseudohashes

Dan Sugalski
January 14, 2000 12:12
Re: On Pseudohashes
Message ID:
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.


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About