On Thursday 2005-07-21 01:22, Martin Blais wrote: > The Rule of Least Surprise says to me that "while:" would do the least > unexpected thing. There are only two possibilities: the test is > implicitly false, in which case "while:" would make no sense (i.e. the > block would be ignored). Therefore the other only sensible case is > that the test is implicitly true, which can be useful (and also > happens to be a very common idiom). To me, the "least unexpected thing" for "while:" to do is to raise a syntax error. The principle of least surprise doesn't mean that for every sequence of tokens you should pick the least surprising thing it could do, and give it that definition. (That's what they do in C++, except for the bit about picking the least surprising semantics.) -- g
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4