KL_HASH_FUNCTION

Colin Paul Adams <[email protected]> Tue, 30 Sep 2008 10:09:44 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
This looks more useful than just providing an alternative hash code
for HASHABLE objects.

To take adavantage of it, I suggest new classes,
DS_HASH_FUNCTION_TABLE [G, K] and 
DS_MULTIARRAYED_HASH_FUNCTION_TABLE [G, K]

(note the unconstrained genericity).

Creation procedures for these classes will possess an additional formal
argument of type KL_HASH_FUNCTION [K], and the class invariant will
specify that `hash_function' is always non-Void.

Given such classes, I don't see the need for `set_hash_function' in
DS_HASH_TABLE. It seems to me that it is only muddying the waters to
have a class that is specific to HASHABLE, and then not use that property.
-- 
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/