On 24 November 2012 09:23, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 11/23/2012 5:06 PM, Vladimir Panteleev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, 23 November 2012 at 21:21:49 UTC, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 11/23/2012 5:57 AM, Vladimir Panteleev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There might be some incompatibilities, for example due to how the HANDLE type is<br>
declared. In C, you can use either 0 or NULL as a parameter to a function<br>
accepting an integer or pointer. In D, you cannot. IIRC, some types were<br>
declared differently in Druntime's modules and in the win32 bindings.<br>
<br>
If breaking code were not an issue, the best solution would be to make HANDLE a<br>
unique, opaque type (like a struct wrapping an intptr_t or void*) - which is<br>
exactly how it should be treated. It would need to support assignment/creation<br>
from "null" though.<br>
</blockquote>
<br>
This is why I don't approve of attempts to "fix" Windows APIs. It winds up<br>
being incompatible here and there, and breaks things.<br>
</blockquote>
<br>
I don't think I follow the logic of this argument.<br>
</blockquote>
<br></div>
Because if we take on the task of "fixing" Windows APIs, then we also take on the task of documenting them, supporting them, educating people about them, and invalidating the river of documentation that already exists on how to program via the Windows APIs.<br>
</blockquote></div><br></div><div class="gmail_extra">Hear hear! I agree, it should just be cloned verbatim.</div><div class="gmail_extra">I for one have 15+ years of expectation about WINAPI, I don't want to look in any manual/reference to relearn how to use it again.</div>