On Thursday, 1 August 2013 at 20:59:31 UTC, Stewart Gordon wrote:

Along these lines, I'm thinking of making a few more changes:

- Just use the D const pointer syntax where we need it, rather than this CPtr template that was made for D1 compatibility.

- Declare all constants as enums, in order to force inlining.

+1 on both. When I dropped D1 support from Derelict, this is exactly what I did.

- Define a mixin template along the lines of __AW in newer versions of MinGW, so that

    version (Unicode) {
        alias QwertW Qwert;
    } else {
        alias QwertA Qwert;
    }

can become simply

    mixin DECLARE_AW!("Qwert");


I would be cautious about doing this. I know that multiple string mixins can have a noticeable impact on compile time. I don't know if that holds to the same scale for template mixins, but given the size of the Win32 bindings I would want to be sure before implementing it. I would want to make compile time a top priority. If everyone were always compiling the bindings as a library, it wouldn't be such a concern. But when using build tools which compile imports along with the app source, it can become an issue.

Reply via email to