Windows API and druntime/Phobos

Sean Kelly sean at invisibleduck.org
Fri Jan 27 10:39:41 PST 2012


On Jan 25, 2012, at 11:58 AM, Jesse Phillips wrote:

> On Wednesday, 25 January 2012 at 19:16:34 UTC, Jonathan M Davis wrote:
>> The level of support for the Windows API in druntime and Phobos is pretty low. As I understand it, Windows users are pretty much forced to use http://www.dsource.org/projects/bindings/browser/trunk/win32 if they need comprehensive Win32 API bindings. druntime seems to be trying to define all of the OS-specific stuff like that, but on top of it missing much of it, in the case of the Win32 API, that's a _lot_ of functions, and I don't know if we want to put that much in druntime. So, the question is, how do we want to support the Win32 API in druntime and Phobos?
> 
> It seems to me that calling OS functions are expected to work out of the box. This would preclude requiring a third party library.
> 
> I don't think it makes sense in Druntime. It isn't required for the compiler to work that I know of. Maybe their are some Windows functions used within druntime? Also what is there currently isn't generating documentation.

System headers are absolutely required for Druntime to build.  This is one of the reasons core.stdc and core.sys exist.  Documentation isn't generated because these are interfaces to external APIs, so the documentation for those APIs should be referenced when coding to them.  We could add an empty doc comment to every declaration so something was generated in the Druntime docs, but I don't know why anyone would ever actually refer to them.


More information about the Digitalmars-d mailing list