All of the String types

Strings: can’t live with them, can’t live without them. A new roundup aims to do what many devs quietly wish for — a single, no-nonsense list of the different string types you’ll encounter across languages. It has been reported that the author wrote the post after failing to find a comprehensive list elsewhere. The result reads like a tiny Tower of Babel for text: Rust’s trio, C’s classic pointers and arrays, C++’s generic basic_string, and the byte- and rune-centered view from Go all make an appearance.
What the roundup documents
Rust gets a lot of the spotlight: char as a Unicode code point (32-bit), Vec
Why it matters
Why care? Because encoding, ownership, and mutability aren’t academic nitpicks — they’re where bugs, security pitfalls, and baffling crashes hide. Interfacing across FFI boundaries, handling filenames on different OSes, and doing simple text manipulation all become design decisions when your “string” might be bytes, UTF-8, UTF-16, or a growable heap structure. The post does what good engineering docs should do: it maps the terrain so you stop guessing and start choosing.
Takeaway
If you’ve ever cursed at a mysterious segfault that turned out to be an encoding mismatch, this list will feel like a small victory. It’s not a deep tutorial, nor a definitive spec — but it is a handy compass. Read it, bookmark it, and next time someone asks “which string should I use?” you’ll have an answer that isn’t just hand-waving.
Sources: lambdalemon.gay, Lobsters
Comments