On Saturday, October 25, 2014 01:11:26 dcrepid via Digitalmars-d-learn wrote:
> On Friday, 24 October 2014 at 22:53:15 UTC, Jonathan M Davis via
> Anyway, some things to think about.

DirEntry and all of the related functions and types would need quite a bit of
rewriting to do what you're suggesting, and most folks aren't going to be
using the Windows API enough for it to matter that std.file operates on string
rather than wstring. And much as the Windows API unfortunately uses wchar all
over the place, the functions that are being used internally in dirEntries and
company and using static arrays of wchar, so it's not like using wstring
instead of string would avoid any allocations. All it would do would be to
avoid decoding and re-encoding the Unicode from UTF-16 to UTF-8. Additionally,
the cost of the file operations would dwarf the cost of any allocations
anyway. So, I'm not in the least bit convinced that altering anything in
std.file to use wstring would be of much benefit, and all previous suggestions
to support wstring anywhere in std.file have been shot down (and iin at least
one case, it was by Walter Bright, and he works on Windosw primarily).

- Jonathan M Davis

Reply via email to