Range (computer programming): Difference between revisions

Content deleted Content added
m Fixed minor inconsistency
Line 14:
 
== Range as an alternative to iterator ==
Another meaning of ''range'' in computer science is an alternative to [[iterator]]. When used in this sense, range is defined as "a pair of begin/end iterators packed together" <ref name="itersmustgo">{{Cite web
| author = [[Andrei Alexandrescu]]
| title = Iterators Must Go
| url = http://www.boostcon.com/site-media/var/sphene/sphwiki/attachment/2009/05/08/iterators-must-go.pdf
| Iteratorsdate Must= Go,6 AndreiMay Alexandrescu,2009
| accessdate = 23 May 2010
| publisher = BoostCon 2009]
}}</ref>. It is argued <ref name="itersmustgo" /> that "Ranges are a superior abstraction" (compared to iterators) for several reasons, including better safety.
 
In particular, such ranges are supported in [[Boost C++ Libraries]] <ref>[http://www.boost.org/doc/libs/1_35_0/libs/range/doc/intro.html Boost.Range documentation]</ref>.
 
== References ==