3 ms·
If you shouldn't use non-booleans in an if statement, then why is it allowed? If it's allowed, it should behave in the way that would surprise developers the le
by schrodinger 13y ago
If you shouldn't use non-booleans in an if statement, then why is it allowed? If it's allowed, it should behave in the way that would surprise developers the least.
http://en.wikipedia.org/wiki/Principle_of_least_astonishment http://en.wikipedia.org/wiki/Principle_of_least_astonishment