DMD supports ranges, but druntime can't see them?
Manu
turkeyman at gmail.com
Thu May 23 06:16:08 UTC 2019
I noticed a bizarre situation just now; while DMD has magic in the
compiler to understand ranges and lower foreach loops to call range
primitives and such, the material to determine any range API is not
available to druntime, it's all the way out in std.range.primitives.
Why is there no core.range with said primitives in it? I think it's
fine that chain and zip and iota all that jazz is in phobos, but
surely isInputRange, isRandomAccessRange, hasLength, etc should all be
in the lowest level runtime possible?
It's kinda the same deal as those select traits which are practically
part of the language, they don't generate any code, and it's virtually
impossible to do anything useful without them.
Should they be moved?
More information about the Digitalmars-d
mailing list