3 ms·
Except Go has panics and they turn up quite a lot looking exception-like. Go with panics moved to regular error returns doesn't seem like it would lose anythin
by XorNot 9y ago
Except Go has panics and they turn up quite a lot looking exception-like.
Go with panics moved to regular error returns doesn't seem like it would lose anything.
- m_mueller 9y agoMaybe panic is just a better name so people don‘t get the idea to use it for control flow in slightly less than normal situations? (i.e. ValueError, StopIteration in python).
- laneb 9y agoNothing about names like StopIteration and AttributeError indicate to me that I should use them for control flow. Python just instructs me to use them that way...
- m_mueller 9y agoMy point is, that part of python is IMO a bit ugly. Not due to naming, but because these are exceptions. A type system with good use of optionals across the standard lib is certainly more elegant than ValueError.