Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Well, not saying to always use it, but if the string size is big enough, the overhead of 2 ints becomes relatively vanishing.

In that case, the fix is not to change C strings (breaking a lot of existing code), but to introduce a stringbuilder type.



You can still use null terminator for compatibility (std::string does use this), but just not rely on that in your own code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: