News for hackers. Stuff that matters.
Re:Google paid a $250K reward for a bug by uecker on Monday August 11, 2025 @05:01AM (#44862128)
The language is just fine. The real question is: Why do people not use a string library that abstracts this away safely?
Re:Google paid a $250K reward for a bug by saagarjha on Monday August 11, 2025 @07:30AM (#44863021)
Why does the language not make one?
Re:Google paid a $250K reward for a bug by tonyhart7 on Monday August 11, 2025 @07:40AM (#44863100)
because at that time, C creator didn't know thing would evolve into the future. after all computer is a new thing
Re:Google paid a $250K reward for a bug by saagarjha on Monday August 11, 2025 @07:44AM (#44863125)
Ok, but the question asks why one isn't made today.
Re:Google paid a $250K reward for a bug by uecker on Monday August 11, 2025 @07:56AM (#44863200)
There are many string libraries.
Re:Google paid a $250K reward for a bug by saagarjha on Monday August 11, 2025 @07:58AM (#44863217)
As you can expect, the answer to your question is the obvious one.
Re:Google paid a $250K reward for a bug by uecker on Monday August 11, 2025 @11:56AM (#44865694)
I do not think it is obvious or trivial question. I think the problem is mostly that there is no money for enhancing the C ecosystem and educating people about possibilities. The cooperate money goes into random new things.
Re:Google paid a $250K reward for a bug by saagarjha on Thursday August 14, 2025 @06:26AM (#44898792)
I think most of the money goes to new languages that have a better strings story, yes.
Re:Google paid a $250K reward for a bug by WalterBright on Monday August 11, 2025 @01:19PM (#44866818)
Oh, people tried. Every C programmer tried it. I tried multiple times. They all failed.

Back when I was musing about what D would be like, I happened across some BASIC code. I was drawn to the use of strings, which were so simple in BASIC. I decided that D would be a failure if strings weren't as easy to use as in BASIC.

And D strings turned out to be better than I'd dared hope!

I proposed an enhancement to C to get much of that benefit, but it received zero traction in the C community. Oh well.

https://www.digitalmars.com/articles/C-biggest-mistake.html