Hi, can someone tell me why Haskell strings are linked lists? I have had some problems with Haskell strings:
1. Today I spend a few hours trying to track down a memory leak. It turns out I just didn't realize how much space a string takes up. On my machine "replicate 5000000 'a'" will use 90MB of space! 2. They are extremely slow for most operations like writing to disk, adding something to the end, concatenation, etc. 3. They make learning Haskell harder. Lazy IO functions like hGetContents are kind of slick in a shallow way, but I was confused about the Haskell IO model because I thought of this as the normal way IO was done, not something you could only set up through unsafeInterleaveIO or similar. Python's strings are also immutable, but they work great and are really convenient. They are apparently implemented as variable length arrays. -- Ben Escoto _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell