Weird issue with std.range.iota.length
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 12 11:00:29 PST 2016
On 02/12/2016 12:58 PM, H. S. Teoh via Digitalmars-d wrote:
> IMO, fixing a specific type for length is a mistake. Truly generic code
> should treat the length as an opaque type (possibly satisfying some
> constraints, like <-comparable, ==-comparable, and maybe supporting
> basic arithmetic operations), and should use generic templates like
> CommonType!(...) if it needs to work with multiple length types.
Tried that for a while, it quickly became a mess of entangled
intestines. Not worth it. -- Andrei
More information about the Digitalmars-d
mailing list