|
|
Hi,
I've read (in "joel on software") that, to avoid confusion between == and =,
when you sometimes use languages that use = as assignments AND comparisons,
you can do some comparisons like this :
0 == myvalue
instead of
myvalue == 0
the former causes an error if you put = instead of ==, which avoids potential
headaches later.
While it could seem very ordinary to hardcore programmers here, to me it's
very smart, and I would like to know if there's some place where I could
learn other little tricks like this...
any links ?
Fabien.
Post a reply to this message
|
|