The new core.sys.windows

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 15 01:18:23 PDT 2015


On 15-Oct-2015 00:52, Vladimir Panteleev wrote:
> Hi all,
>
> Barring last minute objections, the new core.sys.windows package is
> ready for merging:
>
> https://github.com/D-Programming-Language/druntime/pull/1402
>
> Essentially this is the win32 package from the DSource bindings project
> with the necessary adjustments for Druntime inclusion. See the PR
> description for details.
>
> There are two remaining open questions, which although don't block the
> merge, warrant wider discussion:
>
> 1. License. Most headers in the win32 project state that they are in the
> "public domain". As such, we could relicense them under the Boost
> software license (the license used for most D components). This could
> also be done later, but cannot be reversed. I understand that releasing
> something as public domain is also not legally recognized in many
> jurisdictions.

I'd opt to Boost all the way down. I'm not really a lawyer nor do I have 
a problem with public domain.

> 2. Successive edits in layout, style, strictness and D-ification. Once
> the PR is merged, we will have a window until the next master-borne
> release during which we can make breaking changes. After that, no
> breaking changes should be made.

Makes sense.

>
> For example: usage of named enums. In C, all enums (or #defines) all
> live within the name namespace, with a prefix serving as the
> disambiguating "namespace", and all are implicitly convertible to each
> other. In many places, the bindings use named enums instead, which
> provides the advantage of strong typing - if a function accepts a
> parameter of a certain enum, you cannot accidentally pass a member of
> another enum.
>

Being a windows developer while I was young (and foolish) I would use 
wrong constants in the wrong parameter all the time. Even with some time 
passing I had to double check every argument manually. So yes, please - 
strong enums are hugely beneficial.

Interestingly ORing together enums will yield the same enum which is a 
good thing in this case.

> So, if you have any ideas along these lines, speak up now.
>


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list