Re:Subtraction is not comparison
by bluecalm on Friday December 26, 2014 @09:38AM
(#8798915)
The difference is that:
Is a common expression which is very efficient (why else would you write anything in C if you don't care about code being fast/efficient?) and what you proposed is neither.
[ Parent
| on HN ]
Re:Subtraction is not comparison
by CamperBob2 on Friday December 26, 2014 @03:21PM
(#8800198)
I write (and read) about 20,000 lines of C(++) a year, and have for the last 20 years. I've never seen that done.
Re:Subtraction is not comparison
by SamReidHughes on Friday December 26, 2014 @04:11PM
(#8800398)
That doesn't mean the expression is unreadable. It is still extremely straightforward in what it does.
The real difference is that it's simple. There are only 11 symbols in the expression, only two things that can vary, and only three interesting cases. As opposed to 129 symbols and some large number of interesting cases.