[Haskell-cafe] Fwd: Abandoning String = [Char]?
David Feuer
david.feuer at gmail.com
Sat May 23 04:30:49 UTC 2015
Performance will go utterly out the window if you use pattern synonyms
and the like to pretend that Text is [Char]. It would probably work
fine (great, even) when matching, but code that assumes String=[Char]
would be completely killed on the construction side, because building
Text by consing, or repeatedly prepending small chunks, is
ridiculously inefficient. These are the very things that are
*efficient* with [Char], and that people have assumed to be efficient
when writing code that uses it.
On May 22, 2015 5:58 PM, "Carter Schonwald" <carter.schonwald at gmail.com> wrote:
>
> one direction that this thread has *COMPLETELY* overlooked is the following:
>
> could we use pattern synonyms or something along those lines to make the migration to Text or the like more seemless?
More information about the Haskell-Cafe
mailing list