Recommendations on avoiding range pipeline type hell
Chris Piker
chris at hoopjump.com
Sun May 16 07:20:52 UTC 2021
On Saturday, 15 May 2021 at 14:05:34 UTC, Paul Backus wrote:
> If you post your code (or at least a self-contained subset of
> it) someone can probably help you figure out where you're
> running into trouble. The error messages by themselves do not
> provide enough information--all I can say from them is, "you
> must be doing something wrong."
I just tacked on `.array` in the the unittest and moved on for
now, but for those who may be interested in the "equivalent but
not equivalent" dmd error message mentioned above, the code is up
on github. To trigger the error message:
```bash
git clone git at github.com:das-developers/das2D.git
cd das2D
rdmd -unittest --main das2/range.d # This works
```
In file `das2/range.d`, comment out lines 550 & 553 and uncomment
lines 557 & 558 to get alternate definitions of `coarse_recs` and
`fine_recs` then run rdmd again:
```bash
rdmd -unittest --main das2/range.d # No longer works
```
In addition to the issue mentioned above, comments on any style
issues, best practices or design choices are invited. By the way
the writeln calls in the unittests just temporary.
More information about the Digitalmars-d-learn
mailing list