On Friday, November 02, 2012 10:01:55 H. S. Teoh wrote:
> Ah, I see. That makes sense. So basically it's not the source (or any
> intermediate step) that decides whether to use the optimization, but the
> final consumer.
> 
> Though now we have the issue that all intermediate ranges must propagate
> .fast, which is troublesome if every range has to do it manually. Can
> this be handled automatically by UFCS?

It's no different form propogating slicing or random access or whatnot. Wrapper 
ranges have to look at the capabilities of the ranges that they're wrapping 
and create wrappers for each of the range functions where appropriate. If we 
added isTransient or fastRange or whatever, wrapper ranges would then have to 
take it into account, or the wrapper wouldn't have it.

- Jonathan M Davis

Reply via email to