Nick Sabalausky wrote:
"Andrei Alexandrescu" <[email protected]> wrote in message
news:[email protected]...
Justin Johansson wrote:
"Now please name five remarkable complex literals."
(re, im) ::= (0, 0), (1,0), (0,1), (1,1), (pi/2, 0), (0, pi/2),
e_to_the_power_(minus j),
e_to_the_power_(minus j * pi/2)
Is that what you mean?
(Three of those are real.)
What I meant was that complex literals helped by syntax are seldom likely
to improve code quality. Many numeric literals are of questionable taste
anyway and should at best defined as symbols. I don't see why complex
literals shouldn't follow the same recommendation.
I think people just don't like the idea of having to deal with a distinction
of "Some types can have nice handy literals but others can't."
We got to stop somewhere.
Andrei