-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
spec: document range-over-func #65237
Comments
Change https://go.dev/cl/589397 mentions this issue: |
@griesemer this example is not great // print hello world
f := func(yield func(string) bool) {
if yield("hello") {
yield("world")
}
}
for word := range f {
println(word)
} its not clear when |
@3052 Agreed. And there's a TODO (html comment) in the spec to fix it. One step at a time. |
one of the reasons I love Go is that it is very "readable", but the above example is not that at all. I will be patient and wait on updates to the example, but I have strong concerns about the impact of this new change on how easy it is to read Go code. |
Is there an opened issue about it ? |
Change is in the works. |
Change https://go.dev/cl/590396 mentions this issue: |
For #65237. Change-Id: Id38747efebd46633f453eadaf68d818064faa778 Reviewed-on: https://go-review.googlesource.com/c/go/+/590396 Reviewed-by: Robert Griesemer <gri@google.com> TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
Tracking bug for adding range-over-func to spec. See #61405.
The text was updated successfully, but these errors were encountered: