Fixing the imaginary/complex mess

bearophile bearophileHUGS at lycos.com
Mon Jun 13 10:04:23 PDT 2011


Andrei:

> Walter wants to keep the "i" postfix as a hack, but I think 
> that's completely unnecessary.

Before deciding I'd like to know the rationale to keep it. In principle I like handy complex number literals. In practice I don't use them often enough...

Another note: I'd like std.math.abs to perform what std.complex.Complex!T.abs does. So I will be able to use it functionally (currently std.math.abs is able to digest built-in complex numbers too):

alias Complex!double C;
C[] a = [C(1,2), C(2,4)];
auto m = map!abs(a);

Bye,
bearophile


More information about the Digitalmars-d mailing list