Re: ANNOUNCE: multiset 0.1

(moving discussion to the libraries list) Wolfgang Jeltsch wrote:
this is interesting. A few days ago I discovered that I needed such a library and decided to implement it myself. However, I had not started yet when I received your e-mail.
A bit of criticism concerning the name: According to the English Wikipedia, multiset is a single word. So the identifiers should be Multiset and IntMultiset instead of MultiSet and IntMultiSet.
After looking around a bit, it seems 'multiset' is consistently spelled as a single word. Personally I think "MultiSet" looks better, but if more people agree with you I will change the name in the next version.
However, I think it would be even better to just use Bag and IntBag as identifiers. Those are shorter and maybe easier to remember. After all, the term bag is fairly standard.
There are two several for choosing "multiset" over "bag": - The name "multiset" covers the functionality much better. If I didn't know the name of the data structure, only that it is like a set containing multiple copies of elements, I would find it if it was called multiset, not if it was called bag. - The name Bag is also used for other data structures. For instance GHC uses 'bag' for an ordered data structure with fast concatenation. - Other libraries like the C++ STL also use the name multiset.
I think that actually your multiset/bag implementation should be a part of the containers package. So why not ask the maintainers of the containers package for permission to add your implementation and change the identifiers to Bag and IntBag during this process? This would be great.
I initially wrote these modules as part of the containers package. Unfortunatly the libraries process is awefully slow. And if you think about it, there isn't a big advantage to having multiset in the containers package. I decided to get the code out there quickly, so it can be used right now. Perhaps the library could/should be merged into the containers package somewhere in the future. Twan

On Thu, Feb 07, 2008 at 06:20:12PM +0100, Twan van Laarhoven wrote:
Wolfgang Jeltsch wrote:
I think that actually your multiset/bag implementation should be a part of the containers package. So why not ask the maintainers of the containers package for permission to add your implementation and change the identifiers to Bag and IntBag during this process? This would be great.
I initially wrote these modules as part of the containers package. Unfortunatly the libraries process is awefully slow. And if you think about it, there isn't a big advantage to having multiset in the containers package. I decided to get the code out there quickly, so it can be used right now.
Perhaps the library could/should be merged into the containers package somewhere in the future.
These modules would fit quite nicely into the containers package (small "s" in Multiset, please). One can upgrade the containers package without waiting for the next GHC release, but containers is one of the packages most likely to cause problems if multiple versions are installed. ("Couldn't match expected type `containers-0.1.0.0::Data.Set.Set a' against inferred type `containers-0.1.1.0::Data.Set.Set a'")
participants (2)
-
Ross Paterson
-
Twan van Laarhoven