Treating the abusive unsigned syndrome
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Nov 26 06:58:28 PST 2008
bearophile wrote:
> Nick Sabalausky:
>> Oh, right. For some stupid reason I was forgetting that the param would
>> always be an array and therefore be eligible for the existing array property
>> syntax (and that .length always returns a uint).
>
> From the len() code I have posted you can see there are other places where you want to use len(), in particular to count the number of items that a lazy generator (opApply for now) yields.
>
> Bye,
> bearophile
I'm rather weary of a short and suggestive name that embodies a linear
operation. I recall there was a discussion about that a while ago in
this newsgroup. I'd rather call it linearLength or something that
suggests it's a best-effort function that may take O(n).
Andrei
More information about the Digitalmars-d
mailing list