On Dec 7, 09 00:23, Andrei Alexandrescu wrote:
Is there any good use of unary +? As an aside, Perl programs do use it
occasionally for syntactic disambiguation :o).
Andrei
Yes, when you want to port the Boost Spirit parser :o) (OK that's an abuse.)
Well the unary + can help to emphasize "it's a positive number", and
1.0e+10 is already a form of "unary +" (not the operator).
Removing the unary + doesn't lose much, but it doesn't gain much either,
and with it already present in all other languages, I don't see a good
reason to change it.