Remove complex and imaginary types?

S. S at s.com
Tue Jan 8 11:50:16 PST 2008


Walter Bright Wrote:

> The issue comes up now and then about why have complex and imaginary 
> types, rather than using structs? All but one of the advantages of 
> having them be core types can be addressed with advancing compiler 
> technology. Getting rid of them will release 6 keywords, and make the 
> core language simpler. Given the increasing complexity of D, this will help.
> 
> The remaining advantage is that of imaginary literals, i.e. the i postfix:
> 
> 	3 + 5i
> 
> Assuming we solve the literal problem, existing code would only need to add:
> 
> 	import std.complex;
> 
> to acquire complex and imaginary types.

As a physicist who uses D for simulations, my answer is NO!   Your original cited papers are good reasons NOT to do this.   You should also go re-read what YOU wrote on the subject and the papers you cited. 

I don't think that releasing those keywords really makes the language much less "complex."  

Making the language "less" complex entitles making things intuitive, and things that are not intuitive clearly documented!

-S.



More information about the Digitalmars-d mailing list