logoalt Hacker News

ameliusyesterday at 5:00 PM2 repliesview on HN

We should just move away from null-terminated strings, where we can, as fast as we can.


Replies

masklinnyesterday at 5:57 PM

We have. C is basically the only langage in any sort of widespread use where terminated strings are a thing.

Which of course causes issues when languages with more proper strings interact with C but there you go.

show 4 replies
raverbashingyesterday at 5:09 PM

Yes

And maybe even have a (arch dependent) string buffer zone where the actual memory length is a multiple of 4 or even 8