[Issue 14519] [Enh] foreach on strings should return replacementDchar rather than throwing

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 29 09:00:18 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14519

--- Comment #21 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
(In reply to Vladimir Panteleev from comment #16)
> > Global opt-in for foreach is not feasible.
> 
> I agree - some libraries will expect one thing, and others another.

Libraries don't determine on which data the program operates, it depends on the
program and its environment, encoding mismatch has large scale consequence too:
program crashes or corrupts data, libraries don't decide how to behave in such
cases, it's a property of the program as a whole. Since they can't decide how
to behave in such cases, they shouldn't decide and thus can't have different
expectations on this matter, it's a per-program aspect.

--


More information about the Digitalmars-d-bugs mailing list