Why foreach(c; someString) must yield dchar

dsimcha dsimcha at yahoo.com
Thu Aug 19 07:34:01 PDT 2010


== Quote from Kagamin (spam at here.lot)'s article
> dsimcha Wrote:
> > Hmm, lately I've been focusing my hacking efforts on debugging/polishing/removing
> > annoying inconsistencies in Phobos.  Maybe std.string should be my next target.
> > It's generally a frustrating module because in addition to the wide character
> > issue, lots of stuff requires immutable strings when it could work correctly and
> > safely with a const or mutable string.
> They say, there're bugs with inout. You don't need them fixed?

No.  inout is only important where you can't/don't want to use templates.  This is
the case if you're concerned about code bloat, or need virtual functions.  In
std.string, not only **can** I use templates, I **have to** use them to deal with
narrow vs. wide strings.


More information about the Digitalmars-d mailing list