https://issues.dlang.org/show_bug.cgi?id=12698
--- Comment #3 from Andrej Mitrovic <[email protected]> --- (In reply to Kenji Hara from comment #2) > Why do you think this is an issue? std.algorithm.copy does not match to > (char[], char[]) arguments, so std.file.copy is always chosen. Because it's accidental. char[] is not an output range, but byte[] is. So the user might without notice call functions with completely different semantics: ----- /// Just image if the user did "import std;" /// and the "std" package pull was merged, /// it would be similar to the below situation: import std.algorithm; import std.array; import std.conv; import std.exception; import std.file; import std.range; import std.stdio; import std.string; import std.traits; import std.typecons; import std.typetuple; void main() { byte[] src = [1, 2, 3]; byte[] tgt = new byte[](3); copy(src, tgt); writeln(tgt); // [1, 2, 3] char[] srcname = "newname.txt".dup; char[] tgtname = "oldname.txt".dup; // actually *writes to a file*, // potentially overwriting existing contents copy(srcname, tgtname); } ----- --
