Re:C Strings and my slow descent to madness
by throwaway2037 on Thursday April 06, 2023 @09:56PM
(#35477097)
This is a very thoughtful post. Real question: Is the solution to avoid C strings entirely? Use something like a Pascal string that includes the length?
[ Parent
| on HN ]
Re:C Strings and my slow descent to madness
by jiggawatts on Friday April 07, 2023 @05:20AM
(#35479782)
Yes. For the love of god, a thousand times yes. Every other language, even some of the "C-compatible" ones uses explicit-length strings.