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

2004-09-28 Thread John Goerzen
[ haskell newbie alert ] On 2004-09-20, Henning Thielemann [EMAIL PROTECTED] wrote: 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

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

2004-09-28 Thread MR K P SCHUPKE
Can this not be handled in a nicer way by the compiler? What if the compiler tried to allocate the lists in chunks? For example when dealing with strings, why cant the compiler allocate the string as a fixed length unit, terminated with a link to the next unit. (IE allow the atoms in the list to

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

2004-09-28 Thread ajb
G'day all. Quoting John Goerzen [EMAIL PROTECTED]: * (++) is both a list and a string concatenation operator This could easily be handle by a typeclass. * Pattern matching works well with strings (that's my #1 gripe about strings in OCaml) * Thanks to the laziness of Haskell lists,