unsigned policy (implicit conversions for complex?)
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Wed Feb 7 16:38:20 PST 2007
Derek Parnell wrote:
> On Thu, 08 Feb 2007 08:59:56 +0900, Bill Baxter wrote:
>
>> Andrei Alexandrescu (See Website For Email) wrote:
>>> http://erdani.org/d-implicit-conversions.pdf
>
> What is the justification for character types to be implicitly converted to
> integer types? For the same reason that arithmetic with booleans is
> meaningless, so is such operations on characters.
>
> int x = 'a' + 'z'; // Is meaningless.
> int y = cast(int)'a' + cast(int)'z'; // Is now purposeful.
I agree. Those conversions are in there mostly for historical reasons.
Andrei
More information about the Digitalmars-d
mailing list