← Back to context

Comment by Izkata

6 years ago

The idea appears to me to have been popularized by python, where it's straight called an antipattern to do the check beforehand [0]. The language also uses exceptions for standard control flow - for example, there's one called StopIteration that the language uses to indicate to loops that the current generator or iterator has reached its end.

[0] https://docs.quantifiedcode.com/python-anti-patterns/readabi...