On Thu, 19 Aug 2010 10:34:01 -0400, dsimcha <dsim...@yahoo.com> wrote:

== Quote from Kagamin (s...@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.

No no, inout is essential on templates as well.  e.g.:

inout(T) min(T)(inout(T) t1, inout(T) t2)
{
   return t2 < t1 ? t2 : t1;
}

-Steve

Reply via email to