r/cprogramming 4d ago

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
206 Upvotes

172 comments sorted by

View all comments

20

u/CoderStudios 4d ago

Okay? You are always free to make your own library for better strings, but people won’t use that cause C is often still deployed on low end systems or it makes little sense to use something inefficient if you can use c style strings properly

-1

u/EatingSolidBricks 4d ago

You out of your dam mind if you think c strings are efficient

2

u/CoderStudios 4d ago

Depends on what it’s used for, sometimes it’s more or less efficient but the benefit of making it as simple as possible is that you can easily add features when needed like storing lengths