[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 03:03:13 PDT 2015


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

--- Comment #12 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to bearophile_hugs from comment #8)
> Another solution is to deprecate foreach iteration on strings, and require
> something like "foreach(c; mystring.byCharThrowing)" and similar things.

That's not a solution as I bet it breaks 50% of the programs out there.

--


More information about the Digitalmars-d-bugs mailing list