Why is complex being deprecated again?

Lars T. Kyllingstad public at kyllingen.net
Sun Apr 15 23:06:34 PDT 2012


On 15/04/12 23:37, Tove wrote:
> On Sunday, 15 April 2012 at 21:09:13 UTC, Lars T. Kyllingstad wrote:
>>
>> I absolutely do not think it does. There is nothing you can do with a
>> pure imaginary type that you cannot do with a complex type.
>> Furthermore, the imaginary numbers have the unfortunate property of
>> not being closed under multiplication and division, which is
>> troublesome for generic code:
>>
>> ireal x;
>> x *= x; // boom
>>
>> It seems nobody noticed, but I did in fact rewrite all of std.complex
>> two years ago (almost to the day) in preparation for the deprecation
>> of the built-in types. If there is anything missing from the module, I
>> will be happy to add it.
>>
>> -Lars
>
> The quote on the 'Semantics' section has a counter example...
> http://dlang.org/cppcomplex.html
>

See my reply to Stewart.

-Lars


More information about the Digitalmars-d mailing list