3 ms·
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 st
by pipeline_peak 4y ago
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?
- WalterBright 4y agoIf 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.