Annoyance with new integer promotion deprecations

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Tue Feb 6 03:14:37 UTC 2018


On 02/05/2018 09:30 PM, Walter Bright wrote:
> On 2/5/2018 3:18 PM, Timon Gehr wrote:
>> The overloading rules are fine, but byte should not implicitly convert 
>> to char/dchar, and char should not implicitly convert to byte.
> 
> Maybe not, but casting back and forth between them is ugly.

It *should* be ugly, it's conflating numerics with partial-characters.

Which, depending on the situation, you should either A. not be doing at 
all, or B. Be really freaking explicit about the fact that "yes, I know 
I'm mixing numerics with partial-characters here and it's for this very 
good reason XYZ." This isn't the age of ASCII. I can see how it could've 
been a pain in ASCII-land, but D doesn't live there.


More information about the Digitalmars-d mailing list