2 ms·
If I were to write C, I'd probably come up with my list of "The bad parts" (like the js book), and not use those (and agree with my team not to use those). Lik
by serial_dev 5y ago
If I were to write C, I'd probably come up with my list of "The bad parts" (like the js book), and not use those (and agree with my team not to use those).
Like in JavaScript, you can understand and remember how double equals work, if you try hard enough... Or you can just decide to always use triple equals and voila, your problem is solved once and forever.
But I don't write C, so take this with a grain of salt.
- adrianN 5y agoIf it were easy to avoid "the bad parts" of C, there would be a lot fewer exploits based on memory corruption. Many of the bad parts are unfortunately integral to the language. Only the strictest coding standards have a chance to avoid all the bad parts, but it's not generally possible to automatically check for compliance with all rules of, e.g. MISRA, so you still have fallible humans in the loop.