in reply to Re: Why is the null while-loop condition expression true?
in thread Why is the null while-loop condition expression true?
I have to agree the infinitude of while () { ... } does seem a bit counterintuitive
I agree with your reaction, but not your conclusion. With while(1){ doing the intuitively obvious,
I can see absolutely no justification for equivalence between that and while(){
Seems most likely to be a bug that slipped through rather than a deliberate act; and remains because of some misguided backward compatibility justifiction; despite that no one in their right mind would code an infinite loop that way in order to save 1 character.
A bug masquerading as a feature is my assessment.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Why is the null while-loop condition expression true?
by Anonymous Monk on Mar 28, 2016 at 22:45 UTC | |
by BrowserUk (Patriarch) on Mar 28, 2016 at 22:51 UTC | |
by soonix (Chancellor) on Mar 29, 2016 at 08:28 UTC |