Range (computer programming): Difference between revisions

Content deleted Content added
m Dated {{Dead link}}. (Build p621)
BattyBot (talk | contribs)
changed {{Unreferenced}} to {{Refimprove}} & general fixes using AWB (7940)
Line 1:
{{UnreferencedRefimprove|date=December 2006}}
In [[computer science]], the term '''range''' may refer to one of three things:
# The possible values that may be stored in a [[variable (programming)|variable]].
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
Line 21:
| 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>.
 
==See also==