Setting aside the receiver types of methods for the moment, if we consider
the following declaration:
type Y struct {
//some fields
}
Which of the following would be "better" (from a speed and storage usage
viewpoint)?
map[X]Y
map[X]*Y
If we consider that this map could be handed between
Hi,
I am trying to write a function that initializes a generic collection. For
adding new items to the collection, the user specifies a constructor which
takes one argument and returns a pointer to the struct that will be
inserted in the collection, and also sets fields to initial values. For