Other than the usual arguments [1], I just said that it causes contamination of other APIs.
That's a big problem because string is a "vocabulary type". It is passed around across various libraries within a given process constantly. There should be a lot of convergence on vocabulary types to avoid copying string data around incessantly.
Null terminated strings are a poor choice to converge on for high level application code in particular. It's just an inefficient (expensive substrings, redundant length calculation, unclear ownership) and unsafe default for too many use cases.
I don't mind certain performance sensitive applications using C strings to avoid extra registers, though even that is a premature optimization in certain situations.
Null terminated strings are a poor choice to converge on for high level application code in particular. It's just an inefficient (expensive substrings, redundant length calculation, unclear ownership) and unsafe default for too many use cases.
I don't mind certain performance sensitive applications using C strings to avoid extra registers, though even that is a premature optimization in certain situations.
[1] See Limitations: https://en.m.wikipedia.org/wiki/Null-terminated_string