unsigned policy (implicit conversions for complex?)

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Wed Feb 7 16:34:29 PST 2007


Bill Baxter wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
> 
>> Current D botches quite a few of the arithmetic conversions. Basically 
>> all conversions that may lose value, meaning, or precision should not 
>> be allowed implicitly. Walter is willing to fix D in accordance to 
>> that rule, which would yield an implicit conversion graph as shown in:
>>
>> http://erdani.org/d-implicit-conversions.pdf
>>
> 
> I notice the graph doesn't include complex types.
> Is there any reason why float shouldn't be automatically converted to 
> cfloat?

Sharp eyes :o). I was simply too lazy to include complex types. Probably 
real-to-complex conversion should be allowed implicitly, too, as long as 
the basic principle of preserving value is respected.

Andrei



More information about the Digitalmars-d mailing list