[Issue 10541] using ref foreach parameters with std.range.zip is a no-op

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 27 14:34:42 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=10541


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #3 from monarchdodra at gmail.com 2014-03-27 14:34:36 PDT ---
More than just allowing Zip to be used in a "foreach ref", the real issue is
the code compiling at all:

Issue 11934 - Allow `ref` in `foreach` over range iff `front` returns by `ref`
https://d.puremagic.com/issues/show_bug.cgi?id=11934

Issue 11934 - Allow `ref` in `foreach` over range iff `front` returns by `ref`
https://d.puremagic.com/issues/show_bug.cgi?id=11935

Issue 4707 - auto ref for foreach loops
https://d.puremagic.com/issues/show_bug.cgi?id=4707

As for this specific issue, I don't really see any way to fix Zip, short of
putting lockstep's opApply code into Zip.

As a matter of fact, why don't we just do that? Performance? I seem to remember
opApply base foreach is slow (creates a delegate)?

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


More information about the Digitalmars-d-bugs mailing list