|
![](/i/fill.gif) |
In article <38C8DD71.3560294C@neuro.informatik.uni-ulm.de>, Axel Baune
<aba### [at] neuro informatik uni-ulm de> wrote:
> The variant
>
> > > #declare A = A + B;
> > > #declare A = A - B;
>
> is far more readable than the other.
I disagree. I find this syntax:
#declare NumOfParts += PartsAdded;
#declare NumOfParts -= PartsRemoved;
much easier to read than:
#declare NumOfParts = NumOfParts + PartsAdded;
#declare NumOfParts = NumOfParts - PartsRemoved;
I read the += operator as saying "add B to A", instead of "set variable
A to the result of adding A and B". It is a special case, and while more
limited, makes code more readable since you know exactly what the code
is intended to do.
Also, shorter expressions are almost always more readable than longer
ones, even if the longer one is theoretically "cleaner".(within certain
limits, of course. Warp's sig is not an example of shorter==better.) And
the duplicated portion can often get quite large, even when it can't be
put in a separate variable(I very rarely use single character names, I
usually only use them for loop counters.).
> Besides this it would comlicate the parser of PoV if the other
> variant should be maintained. This will lead to a new type of
> possible parser bugs.
As has already been said by others, this isn't true.
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |