Implementing Iterator to support foreach

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 8 02:02:07 PDT 2015


tcak:

> I am planning to implement "Iterator" class. But looking at 
> "foreach" statement, it takes a range only.

Unless you are just experimenting, it's better to not go against 
a language and its std lib.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list