Re:C Strings and my slow descent to madness
by gpderetta on Thursday April 06, 2023 @10:13AM
(#35468555)
The worst part of C strings is that they tend to show up in APIs (especially system calls). This make interoperability with other languages harder than it should m
[ Parent
| on HN ]
This is why I hate them too. You can use a custom length + pointer type for representing strings in your own code, but interfacing with other libraries and the OS almost always requires having a null-terminated string. It forces you to make copies just to tack on the null terminator.