develooper Front page | perl.perl6.internals | Postings from July 2002

Re: RFC - Hashing PMC's <albie@halfarrabio.di.uminho.pt>

From:
Ashley Winters
Date:
July 23, 2002 01:26
Subject:
Re: RFC - Hashing PMC's <albie@halfarrabio.di.uminho.pt>
Message ID:
200207230827.32395.qaqortog@nwlink.com
On Tuesday 23 July 2002 07:47 am, Alberto Manuel Brandão Simões wrote:
> Now, I ask for PMC programmers to take care implementing this! Notice
> that, for example in arrays, arrays with the same length but different
> elements should return different hash codes (or try). But for the same
> elements MUST return the same hash code.

@foo = ();
%hash{@foo} = 10;
push @foo, 'This would change the hash key for @foo?';

print "ok 1" if exists %hash{ [] };
print "ok 2" if exists %hash{ [10] };
print "ok 3" if exists %hash{@foo};

What's going to get printed from that?

Ashley Winters

-- 
When you do the community's rewrite, try to remember most of us are idiots.




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