Steve Teale wrote:
Andrei Alexandrescu Wrote:
I don't quite understand this. Ranges are a very simple abstraction
for iteration. They show how other iteration abstractions either
were too unsafe and verbose (C++/STL) or too bare-bones (C#
iterators, Java iterators, singly-linked lists used by f
Andrei Alexandrescu Wrote:
> I don't quite understand this. Ranges are a very simple abstraction for
> iteration. They show how other iteration abstractions either were too
> unsafe and verbose (C++/STL) or too bare-bones (C# iterators, Java
> iterators, singly-linked lists used by functional l
Georg Wrede wrote:
Not cosidering D or programming, the notion of a range implies a
beginning and an end.
Actually, not. Infinity is a primitive notion with ranges. A range that
defines empty like this:
enum bool empty = false;
is detected as infinite and treated accordingly by certain othe
Not cosidering D or programming, the notion of a range implies a
beginning and an end. So, in a certain sense, ranges could be
conceptualized as slices.
All's well, and everything. But, things like input streams don't really
support the notion of "range", or "slice". They don't even want to.