[Haskell-cafe] Re: Data Structures GSoC

John Lato jwlato at gmail.com
Wed Mar 31 07:36:04 EDT 2010


> From: Roman Leshchinskiy <rl at cse.unsw.edu.au>
>
> On 31/03/2010, at 18:14, Achim Schneider wrote:
>
>> We have a lot of useful interfaces (e.g. ListLike, Edison), but they
>> don't seem to enjoy wide-spread popularity.
>
> Perhaps that's an indication that we need different interfaces? IMO, huge classes which generalise every useful function we can think of just isn't the right approach. We need small interfaces between containers and algorithms. In fact, the situation is perhaps somewhat similar to C++ where by providing exactly that the STL has been able to replace OO-style collection libraries which never really worked all that well.

Agreed.  There should be a hierarchy with multiple interfaces, e.g.
Collection, List, Map, Set, etc.  I can't speak for Edison, but
ListLike only implements the List, and doesn't provide an appropriate
base class.  I also agree that the STL (as well as the generic
collections in C#/ASP.Net) seem to take the best approach here.

That being said, I also agree with Darryn Reid that Data.HashTable
could use some work as a higher priority.

John


More information about the Haskell-Cafe mailing list