Slides from my ACCU Silicon Valley talk

bearophile bearophileHUGS at lycos.com
Tue Dec 14 02:15:05 PST 2010


Andrei:

> So you mean I should ask _that_ question but _other_ people.

I don't understand what you mean.
There right questions need to be asked to the right people. I think most C/C++/D/Java programmers don't use complex numbers, so asking to generic programmers about complex numbers in their code may be useful just to know how often complex numbers are used in programs, but it can't tell you much about how good complex literal are.
If you want to design complex numbers in D, you have to ask to people that surely have written more than 100 lines of code that uses complex numbers (in Python too there are complex literals, so some Python programmer too may be useful for such questions).


> Magic constants have issues - be they strings, integrals, or doubles. I 
> have trouble thinking that complex literals are somehow exempt.

I partially agree. They need to be used with care (and defined only once in the code). On the other hand removing all integral literals from my D programs isn't going to improve them :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list