Re: [Haskell-cafe] Motion to unify all the string data types

On 10 November 2012 04:00, Johan Tibell
As for type classes, I don't think we use them enough. Perhaps because Haskell wasn't developed as an engineering language, some good software engineering principles (code against an interface, not a concrete implementation) aren't used in out base libraries. One specific example is the lack of a sequence abstraction/type class, that all the string, list, and vector types could implement. Right now all these types try to implement a compatible interface (i.e. the traditional list interface), without a language mechanism to express that this is what they do.
Data.Collectionshttp://hackage.haskell.org/packages/archive/collections-api/1.0.0.0/doc/html... has (among others) a Sequence type class and provides instances for the base data types in a separate package. However, it appears that not many people are using it.
participants (1)
-
Tobias Brandt