3 ms·
> Bold! I wonder what leads to this sort of confidence. honestly just skimming through MIRSA C 2004 > Rule 17.4 (required): Array indexing shall be the only a
by jackdoe 1y ago
> Bold! I wonder what leads to this sort of confidence.
honestly just skimming through MIRSA C 2004
> Rule 17.4 (required): Array indexing shall be the only allowed form of pointer
arithmetic. Array indexing is the only acceptable form of pointer arithmetic, because it is clearer and hence less error prone than pointer manipulation.
I don't think compliance with such rules really solve things, and in some cases just introduce complexity, e.g there is also rule for never using recursion: Rule 16.2 (required): Functions shall not call themselves, either directly or indirectly
but also, it is easier to judge if a book is good than to write a good book
> Yes. Transparency is the only foundation of trust.
teenagers and corporations disagree :)
- guappa 1y agorecursion on embedded devices is terrible… you have very little memory.
- praptak 1y agoIt's more about having an easily verifiable limit on the size of the call stack. You can still use recursion in algorithms with this rule. It just forces you to allocate a separate stack to manage it.
- guappa 1y agoSeparate stack still uses memory, you need to prove the bounds.
- praptak 1y agoYes. My point is that: 1. "No cycles in call graph" is not about memory usage but about having an easily provable limit on call stack and 2. "No cycles in call graph" is not about banning recursion. I agree that the call stack limit is much more important in environments with tight memory but the rule is about the stack limit, not memory in general. Edit: for 2. I obviously mean recursion as the class of algorithms, not as the property of the functions used to implement it.
- earnestinger 1y agoReasons why: Corporation does not care about life per se, it looks at impact on profit. Corporation has option to sue offender into oblivion (by thoroughly writing contracts)