Hacker News new | past | comments | ask | show | jobs | submit login

Null-terminated strings is an endless source of bugs in C progras. I with C used fixed size strings (may be with varint instead of 8-bit length field) or Pascal got more tratcion.



And very annoyingly they can't be sliced except if you are only trimming off the front. If you need to chop off anything at the end, you either need to make a copy or do an icky and not thread safe hack of swapping out a character for the null character and then swapping it back when you're done.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: