Bulk Initialization #27
Labels
No labels
bug
discussion
documentation
duplicate
ignore
new feature
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
golibs/gms-gods#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It'd be nice to have a bulk initialization convenience method for the container interface. Example use case is creating a hash or set of a heavily used static data set, like country information.
Sounds reasonable, but I'm just not sure if you need that for all container types? Most of the containers that contain only values, e.g lists, sets, have the Add function that can take multiple values. So I guess you need something similar for containers that have key-value pairs?
@jjharr friendly ping.
Does the list.Add(...) function provide what you need? I gave this some more thought for the key-value pairs and I am not sure of a clean way of bulk-initializing key-value pairs. Perhaps you have some ideas?
Sorry, new baby in the house and it's kind of a life-bomb.
I actually completely missed the signature for Add (facepalm).
It seems like the Go type system would make the addition of a large [interface{}]interface{} map unreasonably awkward relative to just calling Put multiple times. So... I withdraw the feature request!