4 ms·
(Just my opinion) I completely agree with everything you point out. The argument I am bringing up is not about implementation, it's about "if they didn't use C
by fredmorcos 10y ago
(Just my opinion)
I completely agree with everything you point out. The argument I am bringing up is not about implementation, it's about "if they didn't use C, they would have less (security) problems": No.
C is the way it is towards secure coding because there are compromises to satisfy other dimensions. <Fancy new language that promises to solve all of C's problems> is either making huge sacrifices in these other dimensions or is at best an experiment.
We understand C's weak points so well (due to being widespread, battle tested, really simple, or what have you), that most of the time it's safer (read: more secure) to tread dangerous well-understood territories carefully than uncharted ones only promising to be safe.
- omginternets 10y agoWhat are the sacrifices being made by, say, Rust? I'm only superficially familiar with Rust, but my understanding was that it was basically "C with strong memory guarantees". I naively thought that its entire purpose was to avoid such trade-offs.
- vvanders 10y agoCertain things(circular structures) are harder to represent without dropping down to unsafe code(which is a C equivalent security model). It's a bit more upfront work to satisfy the compiler but I've found the payoff in debugging memory issues to be completely worth it.
- omginternets 10y agoRight, so then it is a net advantage over C, with the (negligible) trade-off of compiler-wrangling. The parent comment seemed to suggest the contrary.
- amenod 10y agoI would agree with you if it wasn't for Rust. If you don't know it yet, I would advise you read up about it - it is ideal for replacing C, being equal at speed and better at safety from common programming errors.
- willtim 10y agoThere are others too, e.g. ATS