core.sys.windows.windows and TCHAR
Kagamin
spam at here.lot
Sat Jan 11 02:04:44 PST 2014
On Friday, 10 January 2014 at 00:37:07 UTC, Adam D. Ruppe wrote:
> Can we change this to alias wchar instead of char? While this
> would be a breaking change, the ASCII Windows functions are
> arguably always wrong to use with D since a D char* is NOT an
> ascii nor Windows encoded string, so any code it "breaks" was
> already (perhaps) broken and should be changed anyway.
It may opreate in a controlled environment, where all characters
are ascii. I hate such assumptions though.
> I know there's other win32 bindings we can download, but for
> just the common types, I like to use the built in aliases, and
> TCHAR, TSTR, etc., are common in copy/pasted MSDN code and can
> easily be subtly wrong with this.
>
> A compromise I'd accept is putting the wchar aliases under a
> version(Unicode) so it is opt-in.
version(Unicode) is a bug in itself. I'd say, drop ansi bindings
entirely, they exist only for source-compatibility with C code
written for win9x.
More information about the Digitalmars-d
mailing list