Lobsters
Read post

The ultimate guide to Haskell Strings · Hasufell's blog

This blog post provides information on the different string types in Haskell, including Text, ByteString, ShortByteString, OsString, and more. It explains the purpose and use cases of each type, as well as their advantages and limitations. The post also covers topics such as Unicode, character encoding, text encoding, and conversions between different types. It emphasizes the importance of using the appropriate string type for different purposes, such as filepaths and operating system API. Additionally, it discusses the drawbacks of lazy IO and suggests using streaming libraries instead. The post concludes by addressing the criticism that Haskell has too many string types, highlighting the unique properties and trade-offs of each type.

    #haskell
May 13, 2024•33m read time•From hasufell.github.io
Post cover image
Table of contents
TOCMotivationString in PreludeUnicodeBack to Haskell String typeString typesLazy vs StrictSlicable vs non-slicablePinned vs unpinnedString Types Cheat SheetConstructionConversionsA word on lazy IOStreamingA note on FilePathsReflectionSpecial thanks toLinks and relevant stuff
34 Impressions
Lobsters's image
Lobsters

Lobsters is a community-driven platform for sharing and discussing links to articles, tutorials, and...

1.9K Followers

•

36.1K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard