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

> Lessons learned, their strings work

It is worse than that, because the other alternative systems programming languages that eventually lost to C and C++ also had their string type.

Just C did not, and C++ followed along due to its compatibility story.



And here is where C shines compared to C++:

At least in C you know that strings are garbage, and you never pretend for a second that everything will be fine. C++ will claim "oh ho ho, we have a string type, don't worry!" and then people will get burned.


If you read the discussion, you would that people are getting burned by converting all the time between char* and std::string, because Google isn't using the same string types across all APIs.

I rather have secure strings, even if every now and then they require some attention to.




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

Search: