[Issue 10712] Compiletime foreach loop

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


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


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #4 from monarchdodra at gmail.com 2013-07-25 04:11:02 PDT ---
(In reply to comment #2)
> Dupe of Issue 4085 ?

Looks like it. I also like the name "Iota!(0, 10, 2)": Imediatly clear.

> > Arguably, iota accepts "iota(10)", but I (and others) think that is a retarded
> > idea, when typing "iota(0, 10)", is just and easy. I think we should avoid
> > making the same mistakes.
> 
> I requested that to Andrei. And I still think it's a good idea, it comes from
> Python iterations:
> 
> >>> range(10)
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> 
> Discussing iota(10) is off topic here, but if you want you can explain here or
> in D.learn.

I think I remember a thread about this. But if there is existing reasons for
doing it that way, I'm not going to go against it.

(In reply to comment #3)
> (In reply to comment #2)
> 
> > >>> range(10)
> > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> > 
> > Discussing iota(10) is off topic here, but if you want you can explain here or
> > in D.learn.
> 
> In D the single argument iota allows you to write UFCS chains like:
> 
> ....reduce!(...).iota....

That's a good point.

Closing as dup.

*** This issue has been marked as a duplicate of issue 4085 ***

-- 
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