4 ms·
And then none of the benefits are available to existing code without a rewrite. That’s why some solutions to this involve applying attributes to function proto
by eschaton 3y ago
And then none of the benefits are available to existing code without a rewrite.
That’s why some solutions to this involve applying attributes to function prototype arguments and variable declarations instead, so you don’t have to rewrite everything to discover and prevent bugs.
- WalterBright 3y ago> And then none of the benefits are available to existing code without a rewrite. That's right. > That’s why some solutions to this involve applying attributes to function prototype arguments and variable declarations instead, so you don’t have to rewrite everything to discover and prevent bugs. In every case I've seen you have to rewrite the code to use bounds checking. Note that the proposed arrays can be trivially converted to pointers, so you can still interact with pointer interfaces, and even length+pointer interfaces, without rewriting those interfaces. I submit that the rewrite to using the proposed arrays is a lot easier than rewriting to use the explicit length+pointer.