I'm back
Jonathan M Davis
jmdavisProg at gmx.com
Mon Nov 12 15:14:05 PST 2012
On Monday, November 12, 2012 12:28:14 Andrei Alexandrescu wrote:
> > Topic on range transience probably, as it is
> > almost concluded.
>
> I'm leaning toward doing nothing about this.
As it stands, most everything assumes that front is not transient. But then we
have ByLine and ByChunk. So, they just plain don't work as ranges for the most
part, but they're in the standard library. Either they need to stop being
transient or to stop being ranges (and use opApply), or we need to decide on a
way to support them being transient as ranges.
The best options at this point seem to be to either insist that all ranges have
non-transient fronts (and adjust ByLine and ByChunk accordingly) or to go with
the peekFront idea. The peekFront idea probably needs some examination though
in order to work on the kinks (e.g. letting peekFront and front return different
types might be useful in some circumstances, but in general, it's likely to
cause a lot of problems if they don't both return ElementType!R).
- Jonathan M Davis
More information about the Digitalmars-d
mailing list