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 find it 
hard to see why Strings were defined  as they are except on the basis of some
prejudice that lists are good and vectors are bad.

How to get Haskell out of this hole without breaking existing code?
Well I don't really know enough about Haskell's design to know this would
work, but could you not overload the string operations and string constants,
and find an alternative for String (say, "Chars", or "Text") to be used
in future for (nearly) all code that deals with text?

As for the original suggestion for Substrings, yes these are a good idea,
but they wouldn't make a lot of sense unless you reform Haskell's
strings.  But Substrings would fit nicely as another type on which
string operations work.

Any chance for Haskell 2000?


Reply via email to