2 ms·
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 shoul
by gpderetta 4y ago
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
- ziml77 4y agoThis 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.