George Russell wrote:
| I think the whole idea of making strings lists of characters is
| barmy, and one of the few things which are a big disadvantage of
| Haskell over ML. The consequence is that one must take a huge
| performance hit on any portable code that deals with text a lot (as
| most code does), for the very dubious benefit of having unevaluated
| thunks in the middle of strings.
I am not so sure this benefit is dubious!
I deal a lot with big files (to generate huge inputs to several
circuit-processing tools). I find it unmissable that the Strings I deal
with are lazy streams of characters.
If you have "strict" Strings, you will have to deal with these issues
yourself, that is, explicitly generating the string line-by-line or
block-by-block or so to avoid space issues.
Not to mention lazily reading a file...
I think there are a lot of cases in which you would want to use
char-vectors for Strings, but do not underestimate the benefit of having
lazy streams of characters.
Koen.
--
Koen Claessen,
[EMAIL PROTECTED],
http://www.cs.chalmers.se/~koen,
Chalmers University of Technology.