Deprecate, and remove, HasNextIterator
#50883
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
deprecation
The
HasNextIterator
class was introduced in Dart 1.0, where we changedIterator
from the earlier (Java-like)hasNext
/next()
API to the (C#-like)moveNext()
/current
API.The
HasNextIterator
can wrap the newIterator
and provide the old interface, and was intended for quick-and-dirty migration of older code.There should no longer be any need for the class. No new code should use it (although it's not documented enough for people to know that they shouldn't use it as a way to cache the
moveNext()
result).No old code should have survived this long without being rewritten at least twice (2.0 and 3.0), and should be using the new iterable API directly now.
There are uses of it in GitHub, but it's hard to filter out out how many are not just forks of the SDK or old code. There are a few actual uses, so we should probably deprecate first and remove later.
The text was updated successfully, but these errors were encountered: