Updates to the WindowsAPI translation instructions; D2 only?

Manu turkeyman at gmail.com
Thu Aug 1 23:47:04 PDT 2013


On 2 August 2013 15:51, Sönke Ludwig <sludwig at outerproduct.org> wrote:

> Am 01.08.2013 22:59, schrieb Stewart Gordon:
>
>  - 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 seriously take into consideration to just drop the "A" versions. D
> is unicode by nature, the "W" versions are supported by all NT systems
> (since Windows 95 using MSLU), and using an ANSI version of a function also
> just begs for bugs if typed as "char*" instead of "ubyte*". Many newer
> functions also just have a single wide string variant.
>

+1, totally agree. There's no compelling reason to support the ascii
functions, and it's not in the spirit of D.

IMO this is just legacy cruft that was maybe still useful in times when
> supporting Windows 95 was important and MSLU had to be installed as an
> explicit add-on, but for nothing else really (although frequently used in C
> programs because it saves typing an additional character: "" vs. L"" or
> even _T("")).
>
> Also switching API based on a version statement always introduces a chance
> to break interoperability of two libraries that require the version to be
> set differently.
>
> The issue here of course is breaking existing code that doesn't use the
> "Unicode" path. Not sure how serious this is, though...
>

Can we do a sensis of some sort?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130802/fd932b49/attachment.html>


More information about the Digitalmars-d mailing list