On 15/04/2012 04:10, Mehrdad wrote:
Why is complex being phased out?
What happened to all this? http://dlang.org/cppcomplex.html

There was a brief discussion about it back in 2008

http://www.digitalmars.com/d/archives/digitalmars/D/Replacing_built-in_complex_What_s_this_about_81214.html

My impression was that the plan is to deprecate it once the stuff in std.complex is complete. std.complex has clearly grown since that discussion, but it still needs a pure imaginary type (and I don't know what else at the moment).

From what I gathered, the reason is that it's an unnecessary complexity (pardon the pun) in the language that relatively few programmers are going to use. The only thing it really gains by being built in is complex/imaginary literals. Even a library complex constructor doesn't need to be as cumbersome as the C++ example code on the comparison page.

Though it does seem that complex numbers, quite ironically, aren't really that complex a feature....

Stewart.

Reply via email to