On 11/24/12, Walter Bright <[email protected]> wrote: > I'd forget about the unicode macro, and call the A or W versions > explicitly.
People already use WindowsAPI (http://dsource.org/projects/bindings/wiki/WindowsApi) and Derelict for many projects, and introducing a new API that isn't compatible with this is going to create compatibility issues. Not to mention newbies which will be utterly confused as to what to use now, the new std.c.windows.windows (which will be what, a single module spanning 100000 lines?) or the WindowsAPI bindings. The WinAPI project has been used and maintained for years (compared to the poorly maintainted std.c.windows.windows where people arbitrarily add stuff to it when they feel the need to). Here we have a guy (Gor) who doesn't even know what declspec is, or what a def file is, or what an import libarary is, who thinks he can use regex to create bindings, and who refuses to use STABLE bindings that were maintained for years. And we're going to allow him to create new backward-incompatible bindings that will supposedly work out of the box (they most certainly won't)? I used to be *for* putting WinAPI bindings into druntime/phobos. But seeing how some pull requests take months to be merged, and Walter's ultra stance on not adding any aliases that help with code readability (A vs W functions), and the obsessive requirement for Phobos to be composed out of massive single modules, I'm beginning to think that keeping the API out of Phobos might actually be a good idea. Here's a crazy thought: if WinAPI is needed by Phobos functions why not just distribute WinAPI with the zipped distribution? You could put it in a special subfolder, e.g.: dmd2/src/dmd dmd2/src/druntime dmd2/src/phobos dmd2/src/bindings <-- put it in here And then in sc.ini or dmd.conf add an import to the bindings folder, and distribute a precompiled static library of the bindings alongside phobos.lib. The -version switches might have to be sorted out, but that has to be a simpler problem than rewriting bindings from scratch.
