couldn't we keep complex number literals?

Don nospam at nospam.com
Mon Jul 26 12:30:21 PDT 2010


Trass3r wrote:
> I'm not completely sure how AAs are implemented now, but I think I read 
> it's somewhat outsourced to druntime. At least there's that struct 
> AssociativeArray(Key, Value) there.
> 
> Couldn't we do something similar with complex numbers?
> Like moving the struct Complex(T) implementation that currently resides 
> in std.complex to the runtime, removing the types (creal etc.), adding 
> them as aliases there and providing some slight syntactic sugar so that 
> complex number literals 5 + 3i are mapped onto a Complex instance?
> 
> I think that would be an ideal solution, wouldn't it?

I believe that is the plan.


More information about the Digitalmars-d mailing list