Darren New <dne### [at] san rr com> wrote:
> >> #if ((0.25 < clock) & (clock < 0.75))
> One you get used to it, you read it as "clock is between 0.25 and 0.75."
What if the operator is something else? How fast can you decipher it
with this simple change:
#if ((0.25 < clock) | (clock < 0.75))
Personally I have to mentally swap the first comparison before I can
even grasp it.
> > People don't say nor think "is 25 smaller than the money I have?" but
> > they always think the other way around. That's why writing things like
> > "if (25 < money)" makes code confusing.
> Read it "is my money more than 25?"
I usually read from left to right. I'm not a Chinese.
Besides, it doesn't make sense that sometimes you have to read
comparisons from right to left and sometimes from left to right.
--
- Warp
Post a reply to this message
|