On 24 November 2012 21:32, Walter Bright <newshound2@digitalmars.com> wrote:
On 11/24/2012 10:45 AM, Manu wrote:
I'm regularly annoyed by the quality of the druntime windows bindigs. I use this
one: http://www.dsource.org/projects/bindings/wiki/WindowsApi
It's better.

I don't think there's really any room for opinion on the topic, the windows
bindings should simply be complete, and correct.
It's a flat C api, I can't imagine anything in there that doesn't translate to D
well.

You can always simply add the ones you need to druntime, and issue a pull request.

Sure, but that's rather time consuming, and the other library I linked is pretty decent.
I'm just supporting the case that more thorough support in druntime would be warmly welcomed :)


As said before, the only details that might require some discussion are the
handling of the windows version macro, and the unicode macro.
I would personally just expect to use them exactly as they are in C, and expect
the user to supply the appropriate versions to D when compiling.

I'd forget about the unicode macro, and call the A or W versions explicitly.

This causes rather annoying issues while porting, and tutorials becomes obscured. Many novice programmers don't understand that most functions are an alias of *A/*U, will be confused by the errors, and I even know many programmers who don't understand what unicode is, therefore don't understand the decision they are making.
I think the aliases are important, they allow tutorials and novice users to continue to work effectively.