3 ms·
An unpopular opinion: just use the C++ as a better C and get firm static typechecking against this 'sds' type. And I personally would rather include const char
by salgernon 7y ago
An unpopular opinion: just use the C++ as a better C and get firm static typechecking against this 'sds' type. And I personally would rather include const char* getUTF8StringPtr(sds) rather than an operator overload too.
When I have a major refactoring project, I typically will try to compile it with C++ first to help catch all the weird wobbly bits like this.
[EDIT: I now see in the comments other people with a similar opinion, so maybe not as unpopular as I would've thought!]