Re:Python Is Eating the World
by momentoftop on Monday August 12, 2019 @08:42AM
(#20674855)
Sorry, I misunderstood what you were after. Ocaml exceptions are used more generally, and often make use of 2.
For instance, the basic stream/iterator in Ocaml is Enum, which always uses an exception to signal when the stream has been exhausted, rather than providing a "has_next" predicate.
Re:Python Is Eating the World
by 9q9 on Monday August 12, 2019 @08:53AM
(#20674961)
That is interesting. Once could argue that since fast exceptions contain non-local jumps with a static target, it is enough to supply only the former, so as to simplify the language.
For instance, the basic stream/iterator in Ocaml is Enum, which always uses an exception to signal when the stream has been exhausted, rather than providing a "has_next" predicate.
The catch site of this exception is dynamic.