DList and SList missing length property?

Paulo Pinto pjmlp at progtools.org
Tue May 28 11:03:49 PDT 2013


Hi,

maybe this is more indicated for d.learn, but I am not sure if
it is not a bug in the documentation/implementation.

According to the phobos documentation, all containers in std.container
should provide a length property.

However it is only available for arrays.

Sure one could use the std.algorithm.count() or std.range.walkLength(), 
but I don't see a reason why SList and DList aren't aware of their 
current size.

Is this on purpose?

--
Paulo


More information about the Digitalmars-d mailing list