std.range.iota enhancement: supporting more types (AKA issue 10762)
Francesco Cattoglio
francesco.cattoglio at gmail.com
Mon Dec 23 07:30:12 PST 2013
On Monday, 23 December 2013 at 15:23:45 UTC, bearophile wrote:
> If the new iota accepts new types, then no existing code is
> using iota for such cases. So you are not breaking code is you
> offer a more restricted range for such types, avoiding O(n)
> behavior for them.
I do realize this, but I don't really like having iota()
returning different ranges for different types. Do you think this
would make sense?
Something like "iota returns a RA range for arithmetical types
and a ForwardRange for any other type supporting opUnary!++"?
More information about the Digitalmars-d
mailing list