Re:Parsing JSON is a Minefield
by esrauch on Wednesday October 26, 2016 @12:12PM
(#12797676)
You say that as fact but you must know it is a matter of opinion: I would say you should match the language idioms. For example, Python iterators and generators work by raising/throwing when there are no more items: it is fully expected and will always happen when you write a for-in loop.
[ Parent
| on HN ]
That seems like bad design. Rust iterators return an Option<T>, for example.