Replacing built-in complex? What's this about?

Walter Bright newshound1 at digitalmars.com
Sat Dec 27 14:33:08 PST 2008


Stewart Gordon wrote:
> - Link compatibility with C has been given as an important feature of D. 
>  Since C has complex and imaginary types, can this work fully if D 
> doesn't?  It might get even trickier when we consider link compatibility 
> with C++, which must support function overloading.  Even if C++ doesn't 
> yet have complex/imaginary, it will probably get them soon, and FAIK 
> some C++ compilers probably already have it as an extension.

Andrei answered most of these points, and I want to deal with this one. 
C++ is never going to get native complex and imaginary, based on my 
discussions with people involved with the C++ standards committee. It 
won't for the same reasons Andrei mentions that it should be removed from D.

For link compatibility, this is not the issue it seems to be because C 
doesn't have name mangling. Parameter passing/return sequences can 
easily be made compatible with a struct complex.



More information about the Digitalmars-d mailing list