3 ms·
Actually, I'll go further and say I hate the existence of bytestrings. I should not be required to know about bytestrings to do text processing at a reasonable
by yummyfajitas 17y ago
Actually, I'll go further and say I hate the existence of bytestrings. I should not be required to know about bytestrings to do text processing at a reasonable speed.
(I have no opinion as to whether it's reasonable to use bytestrings for interaction with the FFI.)
- jrockway 17y agoWhat's so good about a linked list of characters? Really, I think most people complain about bytestrings because "foo" makes a "normal string". If it made a bytestring, who would care? Bytestrings do the same API that you'd expect from any traversable.
- yummyfajitas 17y agoNothing. That's my point -- strings suck, Haskell should implement strings as bytestrings or something that isn't slow.
- tumult 17y agoYou can make "foo" give you a literal ByteString instead of a [Char]. Use the OverloadedStrings GHC extension. You probably knew that already, though.
- jrockway 17y agoYeah. I thought you were saying the entire concept was worthless or something. (Incidentally, I have used plain [Char] strings in some Haskell apps, and the performance has been fine. But really, all I do is get them from a char* and print them, so...)