4 ms·
C is the only sane language left. It never changes and it lets us write code that just works. We can focus on getting things done and shipping rather than learn
by pkrumins 5y ago
C is the only sane language left. It never changes and it lets us write code that just works. We can focus on getting things done and shipping rather than learning new features and Googling compiler errors. Learn once, ship forever.
- drran 5y agoMajority of CVE's are because of C memory model, which is fixed in modern languages. C memory model is the constant source of vulnerabilities, thus it better to write new code in a memory safe language, like Rust.
- pkrumins 5y agoRust is a syntax error, not a programming language.
- DrMeepster 5y agowhat does this mean? It sounds like you tried to make a funny programming insult, but it fell flat if that's what you were going for
- moralestapia 5y ago>Majority of CVE's are because of C memory model I haven't checked that but I believe you. My only nitpick is that I wouldn't put the whole blame for that on C, as there are proper ways to produce "safer"[1] code. What other languages did was lower the entry barrier to write better code, but that doesn't mean one language is inherently better that another. 1: No code is ever safe, not even formally verified code.
- masklinn 5y ago> Majority of CVE's are because of C memory model “Memory safety” (or lack thereof) is probably less ambiguous: usually “memory model” is the interaction between program and memory, specifically as it pertains to concurrency. And in the latter understanding I believe C has about the same model as C++, which is also the one adopted by Rust. And while it’s fiddly, it’s not a complete disaster.
- phendrenad2 5y agoC and Rust have the same memory model though, unless you're using a definition of "memory model" that I'm unaware of.
- rightbyte 5y agoYe the churn is crazy in many languages. I almost had a heart attack when the twitter post stated that "true" and "false" are keywords in C23. However that seems incorrect. On my last workplace we argued if we dared to use stdint.h, since it was so new and fancy. I was a proponent, but there is something calm over discussing whether to use 23 year old additions or not.
- pkrumins 5y agoSounds like a dream workplace similar to mine.
- wffurr 5y ago...except it just changed. And you will be forever left writing insecure memory unsafe code.
- pkrumins 5y agoOne change per decade is not a change.
- zeckalpha 5y agoMore than once per decade: C11, C17, C23
- blinzy 5y agoI guess you can say C17 is a change if you want to be pedantic except it didn't actually introduce any new features; it just corrected some defects found in C11. So we have C89, C99, C11, and C2X (C23?) as the only revisions introducing new stuff...
- sys_64738 5y agoIt’s also upwardly compatible so no messing with code from a deprecated version. Python 2 to python three has this issue. If I need to change my code to make it run on the latest language standard then that is a big red flag for me.
- pkrumins 5y agoWell said, we should team up!
- phendrenad2 5y agoC99 is the last sane language left. The additions since then are just minor syntactic sugar.
- pkrumins 5y agogg
- eternityforest 5y agoThe effort required to do anything besides low level utils in C is immense. And once you have it working, how do you know it's correct? You have to carefully review it. You could write and rewrite everything multiple times in a high level language with that much work. C libraries break all the time. They change them whenever they want. The standard lib and language might be stable but the large frameworks aren't. It doesn't seem at all suitable for large application programs. I do sometimes worry that one day my Python code won't run and 5 year projects will become useless. But so far, popular language aren't showing any sign of going away.