4 ms·
> It's not worth it; stable reliable C is hard enough already. Things tend to break in stupid ways when you do things in old school ways. It's why people replac
by lmm 3y ago
> It's not worth it; stable reliable C is hard enough already. Things tend to break in stupid ways when you do things in old school ways. It's why people replaced that stuff.
If this is your mentality then why use C at all?
- kristopolous 3y agoHuh? There's newer, modern C, C2x, which follows up on both C11 and C99. There's also newer modern libraries that learn from the past. GCC 9 had support for C2x a couple of years ago. You can use the stuff now, pretty safely. The advocacy is to not program C like it's still 1988 (when the most recent K&R C went out) and keep up with the times. The backwards compatibility of C is fantastic, really quite stunning and that is why we shouldn't be afraid of moving forward. As far as good C being hard, do you deny this? It's not a bad thing, it acts as a competency filter. Lousy Python, Javascript, PHP - it still works but lousy C will just crash and explode. That's a feature, not a bug.
- lmm 3y ago> You can use the stuff now, pretty safely. You can use it up to a point, but it's never going to be the natural way of using C. short/int/long are immediately available by default, the stdint types require an extra import and are more cumbersome. And even the most modern versions of the language are still distinctly unsafe. > It's not a bad thing, it acts as a competency filter. Lousy Python, Javascript, PHP - it still works but lousy C will just crash and explode. That's a feature, not a bug. Hardly. Lousy C usually silently corrupts your data (not to mention letting attackers control your computer), and often the authors never even realise it was wrong.