February 13, 2018 Re: import strangeness with std.stdio.write | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole wrote:
> write exists in both, writeln exists only in std.stdio.
>
> Use named imports to pick which write you want.
It does seem a little silly to have a name clash with such a commonly used function. Would it not be better to rename std.file.write to something like writeFile and deprecate the current name?
|
February 13, 2018 Re: import strangeness with std.stdio.write | ||||
---|---|---|---|---|
| ||||
Posted in reply to ixid | On Tuesday, 13 February 2018 at 16:55:10 UTC, ixid wrote: > On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole wrote: >> write exists in both, writeln exists only in std.stdio. >> >> Use named imports to pick which write you want. > > It does seem a little silly to have a name clash with such a commonly used function. Would it not be better to rename std.file.write to something like writeFile and deprecate the current name? Yes, I think it would be worthwhile. Especially that we will allow importing all of Phobos at once in 2.079: https://dlang.org/changelog/pending.html#std-experimental-scripting |
Copyright © 1999-2021 by the D Language Foundation