Annoyance with new integer promotion deprecations

Paolo Invernizzi paolo.invernizzi at gmail.com
Tue Feb 6 08:19:09 UTC 2018


On Monday, 5 February 2018 at 23:18:58 UTC, Timon Gehr wrote:
> On 05.02.2018 22:56, Walter Bright wrote:

>> It's necessary. Working C expressions cannot be converted to D 
>> while introducing subtle changes in behavior.
>> ...
>
> Neither byte nor dchar are C types.

>> The idea is a byte can be implicitly converted to a dchar, but 
>> not the other way around. Hence, f(byte) is selected as being 
>> the "most specialized" match.
>
> The overloading rules are fine, but byte should not implicitly 
> convert to char/dchar, and char should not implicitly convert 
> to byte.

+10000!!!!


More information about the Digitalmars-d mailing list