Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xyzzyz
on Jan 8, 2011
|
parent
|
context
|
favorite
| on:
Which one will execute faster, if(flag==0) or if(0...
I use them conventionally -- it helps me avoid bugs like 'if(foo = 3)' instead of 'if(foo == 3)'. 'if(3 = foo)' just will not compile. The 'if(6.28 < theta)' is just a logical consequence.
Luyt
on Jan 10, 2011
[–]
My C/C++ compiler will give a warning on 'if (foo=3)'.
Python will throw a SyntaxError on 'if foo = 3:'.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: