What is fine common name for Iterator-like interfa...
# coroutines
t
What is fine common name for Iterator-like interface, which has suspend
hasNext
? ChannelIterator has similar contract
t
AsyncIterator
? That's how EcmaScript named its Promise-based interators
t
Suspend != async in common case
Suspend > async, that is why we can’t you “async” prefix
j
Could steal the name from the .NET world and use
Enumerable<out T>
(alternative for
Iterable<T>
) and
Enumerator<out T>
(alternative for
Iterator<T>)
... ideally making
Enumerator<out T>
implement
Closeable
so upstream resources can be cleaned up.
e
confusable with Java's old Enumeration interface though
d
Coroutine + Iterator = Coriterator
SuspendingIterator
e
Susperator