Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate, and remove, HasNextIterator #50883

Open
lrhn opened this issue Jan 3, 2023 · 0 comments
Open

Deprecate, and remove, HasNextIterator #50883

lrhn opened this issue Jan 3, 2023 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. deprecation

Comments

@lrhn
Copy link
Member

lrhn commented Jan 3, 2023

The HasNextIterator class was introduced in Dart 1.0, where we changed Iterator from the earlier (Java-like) hasNext/next() API to the (C#-like) moveNext()/current API.
The HasNextIterator can wrap the new Iterator 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.

@mit-mit mit-mit added the area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. deprecation
Projects
None yet
Development

No branches or pull requests

2 participants