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

Re: [PATCH 5.5.660] better avhv patch

From:
Joshua N Pritikin
Date:
March 1, 2000 17:05
Subject:
Re: [PATCH 5.5.660] better avhv patch
Message ID:
20000301200423.A10879@eq1062.wks.na.deuba.com
On Thu, Mar 02, 2000 at 12:16:26AM +0000, mjtg@cus.cam.ac.uk wrote:
> John Tobey <jtobey@john-edwin-tobey.org> 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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About