unsigned policy (implicit conversions for complex?)
Rioshin an'Harthen
rharth75 at hotmail.com
Thu Feb 15 00:39:33 PST 2007
"Walter Bright" <newshound at digitalmars.com> wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Bill Baxter wrote:
>>> 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.
>
> Implicit conversions from floats to complex types was disallowed because
> it caused overloading problems with math functions.
>
> Separate functions for float and complex functions are desirable.
True, but there has been a proposal for this, which would make it work
correctly, and allow for the implicit conversions when needed. :)
I refer you to
http://www.digitalmars.com/d/archives/digitalmars/D/36360.html, from last
spring.
More information about the Digitalmars-d
mailing list