-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
replace []Issue with []*Issue #180
Comments
While scanning through the old issues, I just found this one and think it is worthwhile doing since this package is frequently handling slices of large structs. I'm thinking that the impact on existing clients will be negligible due to the nice inference properties of Go. @willnorris and @shurcooL - I would like to do this... any objections? |
Note that this is an API-breaking change but should have minimal impact on users of this package due to the nice inference properties of the Go programming language. Fixes google#180. Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
Note that this is an API-breaking change but should have minimal impact on users of this package due to the nice inference properties of the Go programming language. Fixes google#180. Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
SGTM. This looks like an improvement, and updating for API change is easy (in most cases, no changes need to be done). |
Note that this is an API-breaking change but should have minimal impact on users of this package due to the nice inference properties of the Go programming language. Fixes google#180. Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
Note that this is an API-breaking change but should have minimal impact on users of this package due to the nice inference properties of the Go programming language. Bumped `libraryVersion` to 0.2 due to API-breaking change as discussed in google#376. Fixes google#180. Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
Note that this is an API-breaking change but should have minimal impact on users of this package due to the nice inference properties of the Go programming language. Bumped `libraryVersion` to `2` due to API-breaking change as discussed in google#376. Fixes google#180. Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
In general having slices of large structs is awkward because it means that when you range over the slice, you either have to write:
or you write
and put up with the fact that (1) the iteration is doing a (more expensive than pointer copy) struct copy for each element and (2) you cannot modify the elements by changing x, since x is a copy.
If list were a []*github.Issue it wouldn't have these problems.
The encoding/json package can handle slices of pointers just fine, but changing the types would have the drawback of breaking existing clients.
The text was updated successfully, but these errors were encountered: