Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Counter-example:

  while ( j < JMAX) {
     i = callback(j);
     if( i >= FINAL) break;
     ...
If, in the specific circumstances of this use, callback(j) will always equal FINAL before it exceeds it, a test for equality here will not cause the program to behave differently.

The fallacy of your argument is that == is not an assertion that its arguments should always be equal; it is a test of whether they are at some specific point in the algorithm.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: