3 ms·
And also, returning errors by value does not introduce hidden control flow! In python, you have no way of knowing what(if any) exceptions that a function may th
by Zamiel_Snawley 3y ago
And also, returning errors by value does not introduce hidden control flow!
In python, you have no way of knowing what(if any) exceptions that a function may throw, so unless you catch everything you have no way of knowing where execution will end up after calling a function.
Not to mention the intentionally(!) thrown exceptions for iterators. In my book, exceptions are goto by another name.
- diarrhea 3y agoExceptions are goto in disguise to some extent, as it’s forward-jumping only. An important limitation to retain structured programming in this case.