I'm back

Jonathan M Davis jmdavisProg at gmx.com
Thu Nov 15 03:25:48 PST 2012


On Thursday, November 15, 2012 22:07:22 Daniel Murphy wrote:
> Is that really good enough?  Keeping ranges simple is important, but so is
> making the obvious solution 'just work'.

std.array.array will never work with ranges with a transient front unless it 
somehow knew when it was and wasn't appropriate to dup, which it's not going 
to know purely by looking at the type of front. The creator of the range would 
have to tell them somehow. And even then, it wouldn't work beyond the built-in 
types, because there's no generic way to dup stuff.

So, either std.array.array will not work directly with byLine or byChunk, or 
byLine and byChunk need to not have transient fronts. If them not working with 
std.array.array is too un-user-friendly, then they need to be changed so that 
they don't have transient fronts, and transient fronts should just be 
considered invalid ranges (though there's no way to actually test for them, so 
anyone who wrote them would still be able to try and use them - they just 
wouldn't work).

- Jonathan M Davis


More information about the Digitalmars-d mailing list