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

Re: [PATCH 5.5.660] better avhv patch

Joshua N Pritikin
March 1, 2000 17:05
Re: [PATCH 5.5.660] better avhv patch
Message ID:
On Thu, Mar 02, 2000 at 12:16:26AM +0000, wrote:
> John Tobey <> wrote
> > I am becoming discouraged in this effort.  The alternatives I see are
> > to put an array or bit vector in the assign op indicating which
> > elements are hashes (probably no better than the above) or to split it
> > all out in a new op AASSIGN_HEAVY function (not worth it).
> I used to believe that the AVHV stuff was a Good Thing, but the number of
> worms that have crawled out as a result of the attempts to "get it
> right" have made me change my mind.
> A viable scheme needs to have the mechanism better hidden, perhaps by
> putting the key-to-index mapping inside some magic.    And there probably
> needs to be more critical discussion of what this mechanism is
> actually for.
> What we currently have should be deprecated or otherwise suppressed.

Agreed.  IIRC, perl6 seals the implementation of arrays/hashes behind
virtual methods.  Perl5 could do the same using dispatch tables.
I suspect that this would also have the potential advantage of
collapsing the SvTYPE by one or two bits. I can put together a patch
(including a reimplementation of the AVHV fields stuff) by midnight
Thursday, in consideration of the imminent 5.6 release canidate, if
there is enough interest.

"May the best description of competition prevail."
          via, but not speaking for Deutsche Bank Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About