To Walter, about char[] initialization by FF
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Mon Jul 31 03:45:59 PDT 2006
Serg Kovrov wrote:
> * Oskar Linde:
>> Counting the number of characters is also a rather expensive
>> operation.
>
> Indeed. Store once as property (and update as needed) is better than
> calculate it each time you need it.
Store where? You can't put it in the array data itself without breaking
slicing, and you putting it in the reference introduces problems with it
getting out of date if the array is modified through another reference
(without enforcing COW, that is).
More information about the Digitalmars-d
mailing list