digitalmars.D.bugs - [Issue 15928] New: chain(r1, r2, r3, ...) should discard all
- via Digitalmars-d-bugs (22/22) Apr 15 2016 https://issues.dlang.org/show_bug.cgi?id=15928
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: nobody puremagic.com Reporter: andrei erdani.com 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? --
Apr 15 2016