Notes IV

Bill Baxter dnewsgroup at billbaxter.com
Fri Jan 25 04:36:50 PST 2008


Simen Kjaeraas wrote:
> bearophile <bearophileHUGS at lycos.com> wrote:
> 
>>> 'len' is kind of ugly, something like 'size' would be nice.<
>>
>> size is better than length, so I am okay with it.
> 
> Problem with 'size' might be confusion with 'sizeof'. 'lenght' is a 
> common typo for me, so it might be worthwhile to change. Any other 
> fitting names? 'count'?
> 
> Simen

Count doesn't make sense for multidimensional arrays.

Anyway, I don't think it's confusing at all.  It's what C++ uses.  I've 
never heard anyone complain STL was confusing or difficult because it 
used "size" everywhere when "sizeof" was already part of the language. 
(Of course that could be because they were too busy complaining about 
other things in STL that really are too confusing and difficult ;-) )

--bb



More information about the Digitalmars-d mailing list