On 22 March 2010 23:21, Ian P. Cooke <[email protected]> wrote: > > a side-note re: iterators here... > > does anyone here have experience with D's Range construct? > > http://lambda-the-ultimate.org/node/3520 > http://www.digitalmars.com/d/archives/digitalmars/D/Iterators_Must_Go_89524.html > > They argue that Ranges make more sense than Iterators, esp. in the context of > defining standard algorithms. > > Which makes more sense to take as primitive? >
Neither. For some uses they fit equally well but ranges can be used as sets (for bounds checking) effectively whereas iterators can potentially return any sequence including /dev/random. Thanks Michal _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
