Remix.run Logo
teo_zero 3 hours ago

You can surely create a std::string-like type in C, call it "newstring", and write functions that accept and return newstrings, and re-implement the whole standard library to work with newstrings, from printf() onwards. But you'll never have the comfort of newstring literals. The nice syntax with quotes is tied to zero-terminated strings. Of course you can litter your code with preprocessor macros, but it's inelegant and brittle.

krapp an hour ago | parent [-]

Hacker News seems not to hate antirez's sds

https://github.com/antirez/sds

https://news.ycombinator.com/item?id=45014911