[Issue 4085] Steps toward a static foreach

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 25 04:53:47 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=4085



--- Comment #6 from bearophile_hugs at eml.cc 2013-07-25 04:53:45 PDT ---
(In reply to comment #4)

> Copy pasting a proposed implementation from 10712. Pretty much the same thing,
> but also handles indiscriminate types. It passes the prior tests, as well as
> handles the useage with doubles, or chars:

Good (despite in my code I avoid using std.range.iota() with floating point
numbers, because to me it seems a bit bug-prone).


> Maybe it's time to submit this to phobos?

I prefer a "static foreach" in the D language, even a very simple one (example:
you can't use a foreach(Iota) at module scope). But in the meantime it's handy
to have a Iota() in Phobos.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list