Left-bias and non-structural equality.

Bulat Ziganshin bulatz at HotPOP.com
Wed Jan 4 14:58:35 EST 2006

Hello Jean-Philippe,

Wednesday, January 04, 2006, 6:36:14 PM, you wrote:

JPB> We can have high-level types/API for maps and sets that rely on a
JPB> sound Ord instance and in return guarantees validity of the structure;
JPB> and a low level api for AVL trees that allows everything.

imho, it the best way. for rather complex datastructures it is best
to implement in low-level module just the all operations this
datastructure provides and add high-level modules, which models some
abstract data types (Map, Set, Foldable and so on) over this
implementation. moreover, imvho it is better to leave low-level
implementation open (i.e. export all functions and internal
datastructure) so that anyone can add new low-level functions to this
datatype (say, serialization), or use this low-level api to implement
new high-level ADTs

Best regards,
 Bulat                            mailto:bulatz at HotPOP.com

More information about the Libraries mailing list