Re:Best aspects of C
by WalterBright on Tuesday November 17, 2020 @10:44PM
(#25132964)
In my long C career, I invented string library after string library. They all turned out to be garbage. The common cause of their failures is their inability to interact with any other C code.
[ Parent
| on HN ]
Agreed, but that's an issue for all "interface types" on API boundaries (another similar issue is vector and matrix types in math libraries). IMHO a C string library must still be able to efficiently consume and produce vanilla zero-terminated "const char*" string data (and at a stable address, unlike for instance std::string) even if they mostly work with {pointer,length} ranges internally.
Re:Best aspects of C
by WalterBright on Wednesday November 18, 2020 @07:06AM
(#25135868)
C strings are so ubiquitous that the ABI impedance mismatch is just too annoying.