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

--- Comment #7 from Walter Bright <bugzi...@digitalmars.com> ---
(In reply to Vladimir Panteleev from comment #6)
> (In reply to Walter Bright from comment #5)
> > (In reply to Vladimir Panteleev from comment #2)
> > > Doesn't that mean that we'd also need to add overloads to std.file.copy 
> > > (and
> > > many other std.file functions)?
> > 
> > No, the idea is to get the copy operation into the callee, not the caller.
> 
> So I understand that you want to force all callees to pass in an immutable
> string, even though an immutable string is needed only for the rare case of
> when an exception occurs. I don't see how that would be an improvement.

No, I suggested adding two overloads for FileException, one taking string and
one taking const(char)[]. Only the latter would ever call .idup, and the .idup
would only happen when an exception was thrown, and would only have code
generated once for it in the entire code base.

--

Reply via email to