http://d.puremagic.com/issues/show_bug.cgi?id=9087
--- Comment #5 from [email protected] 2012-11-28 05:14:12 PST --- (In reply to comment #3) > Another is to keep language expressive with a little more user's learning. 1) Learning to avoid bugs is a very painful process, it takes lot of time, and some bugs escape even the most precise programmers. Experience shows that automatic tools (like the compiler) are needed. 2) Modifying a copy of a struct/value in a foreach is a rare operation. And there is no significant decrease in D expressiveness, because there are other ways to do it: // program#3 struct S { int x; } void main() { auto items = [S(1), S(2), S(3)]; foreach (it; items) { auto itc = it; itc.x++; } for (size_t i = 0; i < items.length; i++) { auto it = items[i]; it.x++; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
