Skip to content

methods with non-pointer as receiver #13

Closed
wangii opened this Issue Feb 19, 2014 · 3 comments

3 participants

@wangii
wangii commented Feb 19, 2014

Is there any reason why methods signature in this library are like:
func (q Queue) ListQueues(page, perPage int)
instead of:
func (q *Queue) ListQueues(page, perPage int)
as widely used in golang world?

@treeder
Iron.io member
treeder commented Feb 19, 2014

No, they probably should be the way you specify. Pull requests welcome. ;)

@wangii
wangii commented Feb 20, 2014

there is a performance penalty to use value instead of pointer as receiver. see http://golang.org/doc/faq#pass_by_value
i'd suggest to check iron.io's internal golang code base. a fix on client side sdk brings comparatively low value but high cost.

@nikhilm
nikhilm commented Oct 29, 2015

@treeder it looks like this can be closed.

@treeder treeder closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.