std.complex will replace the built-in types

Jonathan M Davis jmdavisProg at gmx.com
Sun Aug 19 13:44:36 PDT 2012


On Sunday, August 19, 2012 20:28:35 teo wrote:
> I read at http://dlang.org/phobos/std_complex.html that "Complex will
> eventually replace the built-in types cfloat, cdouble, creal, ifloat,
> idouble, and ireal".
> 
> Can someone elaborate why? What is wrong with the above types?

I think that it came down to it being an unnecessary language complication 
that didn't really buy us anything (though I don't remember the exact reasons 
given). In general, the trend has been to have everything that doesn't need to 
be in the language in the library, and it was decided that the complex numbers 
would go that route. I believe that the names of the built-in complex types 
will eventually be aliase to the names in the standard library however, so the 
code using them will look very similar if not the same.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list