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

I've proposed this as a backwards-compatible improvement to C:

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

but there's been no uptake on it. I don't get this reluctance to exterminate the biggest source of security bugs in C code, but that sort of reluctance is why I started the D project.




> I don't get this reluctance to exterminate the biggest source of security bugs in C code

The forward thinking people who care about security bugs in C code - those ones who aren't reluctant - did exactly what I'd argue you've done: given up on C. It's selection bias in action.

You started the D project. I'm RIIRing. Others prefer Python. Or perhaps one might use a language that compiles down into C, allowing you the best of both worlds - a decent programming language, and the ability to target whatever wretched excuse for a C89 compiler that has been forced upon you by whatever niche platform you're targeting.

Fixing C's biggest mistake won't fix C. Fixing C's 10 biggest mistakes won't fix C. Fixing C's 100 biggest mistakes won't fix C, and by that point, it will no longer be C. There's an argument to be made for incremental improvements, so I won't discourage your efforts, but it's also the kind of pragmatic, boring, middle ground, half answer that won't make anyone outright excited either.


For excitement, DasBetterC is the answer. It looks and feels just like C, but is a modern language.

But adding slices is an easy add to C, it is backwards compatible, it has zero impact on performance, it does not degrade anything about the C experience, it can be incorporated incrementally, and half of the memory vulnerabilities are taken behind the woodshed and shot.

I'll even claim it leads to performance increases (from not having to do strlen over and over).




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

Search: