On Tue, 23 Jan 2001, John Hughes wrote:

> (exists doesn't work).
> 
> > Neither does delete.
> 
> Ok.  But what should it do?  What does it do for an array?

But we're talking about hashes! At the very least it should make it so
that exists() returns false.

> > And overloading doesn't really work properly.
> 
> Details?

Overloading was the wrong word, FWIW... What I meant was, it doesn't work
right if you subclass a module using @ISA = (...) rather than use base. So
everybody has to *know* the underlying implementation of your class
anyway, so that breaks the very concept of OO/Data Hiding.

> > And reloading modules with phashes doesn't work right.
> 
> I steer clear of reloading, almost anything screws up.

Thats an overstatement in the extreme. Reloading works fine for a great
many people, and most modules.

> > And sub-hashes doesn't work right ($pseudo->{Hash}{SubHash}).
> 
> Details?  Works for me.

SubHash isn't compile time checked! You need to do:

my SubH $subhash = $pseudo->{Hash};
$subhash->{SubHash};

to get the compile time checking.

> > All they do is hide a multitude of sins, for very little real world
> > gain. Try it - convert your app back to non-pseudo hashes and see what
> > performance you lose. I'm willing to bet its not a lot.
> 
> Well, obviously.  Hashes aren't slow.  But they are *BIG*.

??? How many keys are in your pseudo hashes? I'm willing to bet not that
many. The difference is probably less than you think to your particular
application. That is unless its a huge set of objects (thousands).

-- 
<Matt/>

    /||    ** Director and CTO **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site: http://sergeant.org/     **
     \\//
     //\\
    //  \\


Reply via email to