Re: Left-bias and non-structural equality.

On 1/8/06, Adrian Hey
On thing that occurred to me was that calling the AVL tree based sets "Set" might be the wrong thing to do anyway. If we want to allow for future implementations to be based on other data structures then we probably shouldn't usurp the name "Set", but rather call it SetAVL or something. (To allow a consistent naming scheme to be used if someone ever produces SetRedBlack say). Both SetAVL and SetRedBlack would be instances of the "Set" type constructor class (presumably).
So maybe the thing to do would be to keep Data.Set (with biasing specified) for the present, but just put a pointer there in the Haddock to a new module Data.SetAVL (which does not specify biasing). This scheme would also allow the current Set implementation to be retained if it turns out to have some advantages over AVL (seems a bit rash to discard it completely anyway), but it would be called Data.SetAdams (or something..)
As I was writing to Adrian this morning, that's exactly what I am proposing. :) To clarify things, I've put up some more explanations on the wiki: http://haskell.org/hawiki/StandardCollectionLibraries Cheers, JP.

Hello Jean-Philippe, Sunday, January 08, 2006, 9:48:50 PM, you wrote:
On thing that occurred to me was that calling the AVL tree based sets "Set" might be the wrong thing to do anyway. If we want to allow for future implementations to be based on other data structures then we probably shouldn't usurp the name "Set", but rather call it SetAVL or something. (To allow a consistent naming scheme to be used if someone ever produces SetRedBlack say). Both SetAVL and SetRedBlack would be instances of the "Set" type constructor class (presumably).
btw, it's similar to Array history - old Array datatype interface becomes IArray class interface in current libs, with a 5 different implementations -- Best regards, Bulat mailto:bulatz@HotPOP.com
participants (2)
-
Bulat Ziganshin
-
Jean-Philippe Bernardy