On Sat, Mar 24, 2012 at 1:16 PM, Ian Lynagh <ig...@earth.li> wrote:
> Data.Text seems to think that many of them are worth reimplementing for
> Text. It looks like someone's systematically gone through Data.List.
> And in fact, very few functions there /don't/ look like they are
> directly equivalent to list functions.

I'm not sure why the list-inspired functions are there. It doesn't
really matter. It doesn't change the fact that from a Unicode
perspective they give the wrong result in most situations.

> This is no more incorrect than
>    upcase = Data.Text.map toUpper

No and that's why Bryan added a correct case-modification, case
folding, etc to text.

> There's no reason that there couldn't be a Data.String.toUpper
> corresponding to Data.Text.toUpper.

That's true. But this isn't the point we were discussing. We were
discussing whether the simplification of treating strings as a list is
a good thing (from an educational perspective.) I pointer out that
from a correctness perspective it's wrong.

> I think Heinrich meant 20% performance in a useful program, not a
> micro-benchmark.

I that's what he meant and given that "useful program" isn't defined,
so the 20% number is completely arbitrary.

-- Johan

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to