On 1/22/2012 8:04 PM, Jonathan M Davis wrote:
It's not horrible, but it does complicate the code. I know that it's caused some issues for the folks adding to std.windows.registry. And it has to be maintained as other changes are made. For instance, I'd like to go in and make std.file support string types of wchar and dchar. But toMBSz doesn't support anything other than strings of char, so I'm going to have to go and make toMBSz support other string types, and all for platforms that are more or less dead. If we got rid of useWfuncs, then that's not a problem anymore, but we can't do that as long as we try and support pre-Win2K.
Why make std.file support wchar and dchar? You triple the number of functions, all for rarely used cases, and one where the user can trivially convert wstring to string at the call site.