[Haskell-cafe] Byte Histogram
Johan Tibell
johan.tibell at gmail.com
Mon Feb 7 22:15:37 CET 2011
On Mon, Feb 7, 2011 at 10:01 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
>> I think haskell2010's type system is just not expressive enough to
>> create interface generic enough. It's not possible to create type class
>> which will work for both ByteStrings (or IntSet) and lists.
>
> It seems that most people agree: The reason why we don't have container
> classes is that it's difficult to define them in a completely type-safe
> mannar.
>
> (The OOP people, of course, just don't bother trying. They use typecasts
> everywhere...)
>
> Do associated types solve this? Or are there still problems?
Duncan showed me a definition using associated types, which I have
unfortunately forgotten.
Johan
More information about the Haskell-Cafe
mailing list