https://issues.dlang.org/show_bug.cgi?id=15928
Issue ID: 15928
Summary: chain(r1, r2, r3, ...) should discard all arguments
after the first infinite range
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Consider a call chain(r1, r2, r3, ..., rk, ..., rn) where range rk is infinite.
Then that should return the same exact result (type and behavior) as chain(r1,
r2, r3, ..., rk). This is because chaining effectively stops at the infinite
range and simply continues with it forever.
Obviously a good case is chain(r1, r2) which simply returns r1 if infinite.
An alternative would be to refuse compilation - this use may be a bug more
often than not. Thoughts?
--