should int/short/byte implicitly cast to dchar/wchar/char?

Don nospam at nospam.com
Mon May 16 21:04:07 PDT 2011


Nick Sabalausky wrote:
> "Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message 
> news:op.vvk48tn9eav7ka at localhost.localdomain...
> (int/short/byte can sometimes implicitly cast to dchar/wchar/char)
>> What do you think?
>>
> 
> Ick! Kill it!
> 
> 

It's not easy. Simply disallowing it would make code like this illegal:

char c = '0' + n;




More information about the Digitalmars-d mailing list