std.range.iota enhancement: supporting more types (AKA issue 10762)

bearophile bearophileHUGS at lycos.com
Wed Dec 25 02:58:52 PST 2013


Francesco Cattoglio:

> Sorry for the amount of text, but I tried to explain everything 
> in a clear and simple way.
> I'm willing to volunteer for adding support for more types in 
> iota.

Probably directly addressed by issue 10762:

Problem with iota(long)
https://d.puremagic.com/issues/show_bug.cgi?id=6446

iota(BigInt) too
https://d.puremagic.com/issues/show_bug.cgi?id=6447

assertion failure in std.range.iota
https://d.puremagic.com/issues/show_bug.cgi?id=6531

iota should generate char intervals too
https://d.puremagic.com/issues/show_bug.cgi?id=9447


But if you rewrite iota() also take in account the following:

Purity:

Make std.range.iota strongly pure
https://d.puremagic.com/issues/show_bug.cgi?id=5746

map, filter, iota and zip in pure (and nothrow) functions
https://d.puremagic.com/issues/show_bug.cgi?id=8882


An important enhancement:

Optional "[]" syntax for std.range.iota too
https://d.puremagic.com/issues/show_bug.cgi?id=10466

(A less important enhancement is issue 11252).

Bye,
bearophile


More information about the Digitalmars-d mailing list