Content deleted Content added
Paradoctor (talk | contribs) |
Tom.Reding (talk | contribs) m Enum 1 author/editor WL; WP:GenFixes on |
||
Line 1:
{{
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 15:
== 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 =
| author-link = Andrei Alexandrescu
| title = Iterators Must Go
| url = https://accu.org/content/conf2009/AndreiAlexandrescu_iterators-must-go.pdf
Line 21 ⟶ 22:
| accessdate = 29 July 2014
| 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/libs/range/index.html Boost.Range documentation]</ref> and the [[D (programming language)|D]] standard library.<ref>[http://dlang.org/phobos/std_range.html D Phobos Runtime Library std.range module]</ref>
Line 29 ⟶ 30:
== References ==
{{
{{DEFAULTSORT:Range (Computer Science)}}
|