State of DData
JP Bernardy
jyp_7 at yahoo.com
Thu Mar 25 07:02:18 EST 2004
Hello,
I've updated DData again.
http://users.skynet.be/jyp/DData/doc/
http://users.skynet.be/jyp/DData/ddata.tar.gz
* Eq
I've stated the policy regarding Eq: it should mean
equality. This is because it most likely refects
general use, and was already more or less implied in
Set and Map code. Advanced users can still act
differently at their own risk.
In the same vein, I've renamed MultiSet to Bag; being
synonyms, I favoured the most usual name.
* Naming of functions.
(ie. isSubsetOf, etc.)
I still stick to Data.List naming scheme.
These choices are guided by the general goal: having
decent concrete data structures fitting nicely in the
hierarchy, suitable for daily use. (As opposed to the
ultimate all-purpose collection framework)
Point left open:
* Left/Right bias; structure first/last
To me, this barely makes a difference whatever is
chosen. For reasons of compatibility with the old
FiniteMap/Set, "right bias+structure first" might be
better.
Since changing the convention is a tedious work, and
Daan has expressed the wish to take care of the
implementation, I leave the decision to him.
I insist though that functions sharing a name with one
in Data.List should not have their argument order
changed. Namely, having
Data.List.lookup :: Eq k => k -> [(k, a)] -> Maybe a
DData.map.lookup :: Ord k => Map k a -> k -> Maybe a
is inconsistent, thus not desirable.
Cheers,
JP.
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
More information about the Libraries
mailing list