[Issue 9087] Value modified in foreach warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 28 08:20:41 PST 2012


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #6 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-11-28 08:20:30 PST ---
And why should we take a performance hit with a required copy just because
you're worried about the stray mistake where someone mutated a foreach
variable? Honestly, I don't think that I have _ever_ seen a bug caused by this.
That doesn't mean that it can't happen or that it hasn't happened, but I don't
think that it's even vaguely worth worrying about. You have a habit of trying
to get warnings created for every single stray mistake that you think a
programmer might make, and I think that that approach will ultimately lead to a
language that is extremely annoying to use. There comes a point where you have
to let the programmer do their job and assume that they're not going to be an
idiot.

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