Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Henning Thielemann
On Mon, 20 Sep 2004, Einar Karttunen wrote: Size Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. Efficiency is always a reason to mess everything. But the inefficiency applies to lists of every data

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Einar Karttunen
On 20.09 12:59, Henning Thielemann wrote: Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. Efficiency is always a reason to mess everything. But the inefficiency applies to lists of every data type, so

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread MR K P SCHUPKE
Would it not bet better is String were a typeclass instead of a data type. Then the string operations could be redefined by implementation, so you may have strings as lists or strings as arrays? Keean. ___ Haskell-Cafe mailing list [EMAIL

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Henning Thielemann
On Mon, 20 Sep 2004, MR K P SCHUPKE wrote: Would it not bet better is String were a typeclass instead of a data type. It would be nice to have a Sequence type class which provides a uniform interface for common operations on List and Array, Lists of Arrays and so on. Then String could be based

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Dylan Thurston
On Mon, Sep 20, 2004 at 01:11:34PM +0300, Einar Karttunen wrote: Size Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. You know about the PackedString functions, right?

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Einar Karttunen
On 20.09 15:05, Dylan Thurston wrote: You know about the PackedString functions, right? http://www.haskell.org/ghc/docs/6.0/html/base/Data.PackedString.html Yes, but they are quite broken. I am using FastPackedString from darcs for many purposes, which is like PackedString in many ways.

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread ajb
G'day all. Quoting Henning Thielemann [EMAIL PROTECTED]: Efficiency is always a reason to mess everything. OTOH, when efficiency matters, it REALLY matters. (The flip side of this is that efficiency doesn't always mean what you think it means.) The problem is that the current representation