On Tue, Dec 8, 2009 at 2:28 PM, Lukas Pinkowski <[email protected]> wrote:
> Bill Baxter wrote:
>> I say you should completely chop it then.  Leaving it in for literals
>> only leaves a mess that's hard to justify.
>> I have often written things like
>>
>>   glVertex2f(-boxRadius,-boxRadius);
>>   glVertex2f(+boxRadius,-boxRadius);
>>   glVertex2f(+boxRadius,+boxRadius);
>>   glVertex2f(-boxRadius,+boxRadius);
>
> I'm doing the same thing myself, too.
>
> I'm using the unary plus not only for documentation, but also for expressing
> intention: It symbolizes that I did not forget a minus sign for that
> specific value. This way a missing unary minus or unary plus makes me
> suspicious that I have done something wrong in my numerical code.

Well, you can use a leading space for that purpose too, with just
slightly more ambiguity of intent.

--bb

Reply via email to