Discussion: standard iterator interface proposal

362 views
Skip to first unread message

Ian Lance Taylor

unread,
Aug 3, 2022, 8:24:10 PM8/3/22
to golang-nuts
I've just opened a discussion for a standard iterator interface. This
is intended to describe a framework that future generic containers
will implement. If you are interested in this topic, please see
https://go.dev/issue/54245.

We welcome all comments, but please be aware that this is an area that
is wide open for bikeshedding. Before commenting, please make an
effort to ensure that you are not repeating comments that others have
already made. Thanks.

Ian

Amnon

unread,
Aug 5, 2022, 5:35:37 PM8/5/22
to golang-nuts
This is a very good proposal.
The use of the range keyword does scare me. But I'll get used to it eventually.
And I will need a lot more coffee to get my head around the appendix about coroutine optimisations.
But overall this will be a very useful addition which will make a lot of code more consistent and more simple.
Reply all
Reply to author
Forward
0 new messages