Re:Ask HN: What Happened to Borland?
by jstimpfle on Friday December 10, 2021 @03:20PM
(#29514994)
You didn't read my comment right. My statement is there isn't one true string type. I didn't say you shouldn't use a length field.
Zero terminated strings still make some sense of course - ease of reading when looking at byte level representation, and moderate cost savings in packed structs (4, 8, or 16 byte strings). The former is why I zero terminate by default where possible, even when using a separate length field stored somewhere else (almost always).
Zero terminated strings still make some sense of course - ease of reading when looking at byte level representation, and moderate cost savings in packed structs (4, 8, or 16 byte strings). The former is why I zero terminate by default where possible, even when using a separate length field stored somewhere else (almost always).