r/cprogramming • • Aug 17 '26

C Strings: A 50-Year Mistake

https://longtran2904.substack.com/p/c-strings-a-50-year-mistake?r=8qz2zb&utm_campaign=post&utm_medium=web
213 Upvotes

172 comments sorted by

View all comments

Show parent comment

0

u/Intelligent_Part101 Aug 18 '26

Two bytes for counted length would waste memory? That's only ONE BYTE MORE per string than a null terminated string uses.

2

u/alkatori Aug 18 '26

C gave you a byte and here you are arguing for a whole snack!

3

u/Intelligent_Part101 Aug 18 '26

Memory is like potato chips. You can never consume enough.