From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Hashing on System.Address
Date: Tue, 14 Jun 2005 15:03:23 -0500
Date: 2005-06-14T15:03:23-05:00 [thread overview]
Message-ID: <atidnX-aSLHkqjLfRVn-rQ@megapath.net> (raw)
In-Reply-To: mailman.25.1118740226.17633.comp.lang.ada@ada-france.org
"Duncan Sands" <baldrick@free.fr> wrote in message
news:mailman.25.1118740226.17633.comp.lang.ada@ada-france.org...
> > > By the way, is there any reason why Ada.Containers doesn't provide
some
> > > standard hash functions? I reckon hashing on strings and on addresses
> > > would be pretty handy.
> >
> > Out of Containers hierarchy: Ada.Strings.Hash
>
> You know, this implementation advice sounds pretty silly:
>
> Implementation Advice
> 7/2
> The various Hash functions should be good hash functions, returning a
wide spread of values for different string values. It should be unlikely for
similar strings to return the same value.
>
> As if any implementor needs to be told that they should use a "good"
rather than a "bad"
> hash function!
We'd have preferred to say something stronger, and normatively, but there
doesn't seem to be a way to describe what a hash function does, other than
returning a value of Hash_Type that depends of the argument. So we use IA to
describe what the intent is; IA can be informal and use undefined terms like
"good".
Without the IA, the only indication that this is a hash function is the
name. That wouldn't be enough. And if you don't know what a hash function
is, the IA will be helpful.
Randy.
next prev parent reply other threads:[~2005-06-14 20:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 20:18 Hashing on System.Address Duncan Sands
2005-06-13 21:31 ` Mark Lorenzen
2005-06-14 7:23 ` Duncan Sands
2005-06-14 20:18 ` Randy Brukardt
2005-06-15 7:27 ` Duncan Sands
2005-06-13 21:57 ` Matthew Heaney
2005-06-13 23:41 ` Robert A Duff
2005-06-14 2:22 ` Matthew Heaney
2005-06-14 7:27 ` Duncan Sands
2005-06-14 8:52 ` Alex R. Mosteo
2005-06-14 9:06 ` Duncan Sands
2005-06-14 9:09 ` Duncan Sands
2005-06-14 17:00 ` Pascal Obry
2005-06-14 20:03 ` Randy Brukardt [this message]
2005-06-14 23:20 ` Robert A Duff
2005-06-15 7:13 ` Duncan Sands
2005-06-14 8:44 ` Larry Kilgallen
2005-06-14 10:03 ` Marius Amado Alves
[not found] ` <abb2a2c53e3708803aa68bb87834b7bc@netcabo.pt>
2005-06-14 10:14 ` Duncan Sands
[not found] ` <200506141214.14213.baldrick@free.fr>
2005-06-14 10:29 ` Marius Amado Alves
[not found] ` <64f19b6707e4d19f5362900bbfb80b76@netcabo.pt>
2005-06-14 10:49 ` Marius Amado Alves
2005-06-14 8:42 ` Larry Kilgallen
2005-06-14 11:18 ` Duncan Sands
2005-06-14 7:18 ` Duncan Sands
2005-06-14 15:18 ` Matthew Heaney
2005-06-14 16:22 ` Duncan Sands
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox