http://d.puremagic.com/issues/show_bug.cgi?id=8473
Summary: Guaranteed relative key-values with byKey and byValue Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-07-30 09:35:30 PDT --- This is a spinoff of Issue 5466 There is a common need to have a (lazy) range of keys and their corresponding values of an associative array. Sometimes iterating them in parallel with a foreach is not enough, and performing a lookup for each key generated by byKeys is not efficient. So I suggest to state in the D docs that if the associative array is not modified in the iteration, its byKey and byValue yield corresponding key-values (this is currently true, but not guaranteed to be true in all D implementations). This means that this will always be true in all future D implementations: zip(aa.byKey, aa.byValue) === aa.byPair -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------