Hi Kevin,<br><br>thanks for the pointer, although I was aware of the thread and had followed it quite closely, it was quite interesting.<br>But it never explained if and why String should be avoided, all I read is &quot;test and decide depending on the circumstances&quot;, which in itself is good advise, but I&#39;d like to have an idea of the reasons so I can form in idea before actually having to code any benchmarks :)<br>

<br>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&#39;re just working with small pieces of text in non-performance critical code it&#39;s perfectly okay to use String.<br>

<br>Cheers,<br>-Tako<br>
<br><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 08:31, Kevin Jardine <span dir="ltr">&lt;<a href="mailto:kevinjardine@gmail.com">kevinjardine@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi Tako,<br>
<br>
The issues involved with String, ByteString, Text and a few related<br>
libraries were discussed at great length recently in this thread:<br>
<br>
<a href="http://groups.google.com/group/haskell-cafe/browse_thread/thread/52a21cf61ffb21b0/" target="_blank">http://groups.google.com/group/haskell-cafe/browse_thread/thread/52a21cf61ffb21b0/</a><br>
<br>
Basically, Chars are 32 bit integers and Strings are represented as a<br>
list of Chars.<br>
<br>
This is very convenient for small computations but often very<br>
inefficient for anything large scale.<br>
<br>
The String API  is also missing various encoding related features.<br>
<br>
Because of the limitations of String, various alternative libraries<br>
have been proposed. Text is one important option.<br>
<br>
You&#39;ll find much more detail on the above referenced thread.<br>
<br>
Kevin<br>
<br>
On Sep 1, 8:13 am, Tako Schotanus &lt;<a href="mailto:t...@codejive.org">t...@codejive.org</a>&gt; wrote:<br>
<div><div></div><div class="h5">&gt; On Wed, Sep 1, 2010 at 07:14, John Millikin &lt;<a href="mailto:jmilli...@gmail.com">jmilli...@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; &gt; Don&#39;t forget, you can always improve the text library yourself. I love to<br>
&gt; &gt; receive<br>
&gt; &gt; &gt; patches, requests for improvement, and bug reports.<br>
&gt;<br>
&gt; &gt; Are there any areas in particular you&#39;d like help with, for either<br>
&gt; &gt; library? I&#39;m happy to assist any effort which will help reduce use of<br>
&gt; &gt; String.<br>
&gt;<br>
&gt; As a Haskell noob I&#39;m curious about this statement, is there something<br>
&gt; intrinsically wrong with String?<br>
&gt; Or is it more a performance/resource problem when dealing with large amounts<br>
&gt; of text for example?<br>
&gt; (Like having to use StringBuilder in Java if you want to avoid the penalty<br>
&gt; of repeated String allocations when simply concatenating for example)<br>
&gt;<br>
&gt; Cheers,<br>
&gt;  -Tako<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; Haskell-C...@haskell.orghttp://<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>