Re:Why aren't there C conferences? (2018)
by pipeline_peak on Friday August 26, 2022 @04:37PM
(#32612473)
Not trying to be a troll, but is this benefit anything more than having to carry two variables? As in, is this about getting the length without having to use str Len even once?
[ Parent
| on HN ]
Re:Why aren't there C conferences? (2018)
by WalterBright on Friday August 26, 2022 @04:51PM
(#32612604)
If it's part of the type, then the compiler can automatically insert bounds checks. If not, then you'll have to insert the checks manually, which we both know won't happen.
Another trouble with two variables is there's no obvious connection between them. One can be modified without the other, etc.