[Haskell-cafe] Re: ANNOUNCE: text 0.8.0.0,
fast Unicode text support
tako at codejive.org
Wed Sep 1 05:06:04 EDT 2010
thanks for the pointer, although I was aware of the thread and had followed
it quite closely, it was quite interesting.
But it never explained if and why String should be avoided, all I read is
"test and decide depending on the circumstances", which in itself is good
advise, but I'd like to have an idea of the reasons so I can form in idea
before actually having to code any benchmarks :)
Knowing that String literally is a linked list of Char makes it a lot
clearer. I figured that maybe Haskell could be using some more efficient
mechanism for Strings internally, only treating it outwardly as a [Char].
But I guess that in a lot of circumstances where you're just working with
small pieces of text in non-performance critical code it's perfectly okay to
On Wed, Sep 1, 2010 at 08:31, Kevin Jardine <kevinjardine at gmail.com> wrote:
> Hi Tako,
> The issues involved with String, ByteString, Text and a few related
> libraries were discussed at great length recently in this thread:
> Basically, Chars are 32 bit integers and Strings are represented as a
> list of Chars.
> This is very convenient for small computations but often very
> inefficient for anything large scale.
> The String API is also missing various encoding related features.
> Because of the limitations of String, various alternative libraries
> have been proposed. Text is one important option.
> You'll find much more detail on the above referenced thread.
> On Sep 1, 8:13 am, Tako Schotanus <t... at codejive.org> wrote:
> > On Wed, Sep 1, 2010 at 07:14, John Millikin <jmilli... at gmail.com> wrote:
> > > > Don't forget, you can always improve the text library yourself. I
> love to
> > > receive
> > > > patches, requests for improvement, and bug reports.
> > > Are there any areas in particular you'd like help with, for either
> > > library? I'm happy to assist any effort which will help reduce use of
> > > String.
> > As a Haskell noob I'm curious about this statement, is there something
> > intrinsically wrong with String?
> > Or is it more a performance/resource problem when dealing with large
> > of text for example?
> > (Like having to use StringBuilder in Java if you want to avoid the
> > of repeated String allocations when simply concatenating for example)
> > Cheers,
> > -Tako
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-C... at haskell.orghttp://
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe