On Tue, 2002-07-23 at 09:27, Ashley Winters wrote:
> 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{ ['This would change the hash key for @foo?'] };
> print "ok 3" if exists %hash{@foo};
> 
> What's going to get printed from that?

IMHO, it should print 'ok 1'. The idea of the hash function is to use
PMC's as hash keys. That means that different content PMC (as an array
with different elements) must return different hash keys.

Alberto
-- 
Alberto Manuel B. Simoes
Departamento de Informática - Universidade do Minho
http://alfarrabio.di.uminho.pt/~albie - http://numexp.sf.net

Reply via email to