random access-range without lower-power range kinds?
spir
denis.spir at gmail.com
Tue Dec 14 00:09:33 PST 2010
Hello,
It seems impossible to define a random-access range (opIndex + length) alone. In fact, I cannot have it used by the language. Am I missing something?
Random-access looks enough to provide fonctionality for both input and bidirectional ranges without any additional method. "Lowering" for forward iteration means I guess ;-)
for (uint i=0 ; i < coll.length ; i++) {
element = coll[i];
doSomethingWith(element);
}
What is the reason for requiring methods of lower-power range types to be defined? (This makes 5 methods!)
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
More information about the Digitalmars-d-learn
mailing list