[go-nuts] Re: Functions vs Methods: explain reasoning behind STD

2022-06-03 Thread Henry
I think after a while people tend to come up with their own best practices when using Go. Each person has their own preference. There is really no right or wrong here. The argument for method vs function usually comes down to the domain and which makes more sense. For my own 'rules', I prefer

[go-nuts] Re: Functions vs Methods: explain reasoning behind STD

2022-06-02 Thread Deividas Petraitis
I am really happy with thoughts and points shared so far, thank you all! Unfortunately I am not able to edit original my post, so to make sure I got all of these points I will just sum up everything below, I think this summary may be valuable for any less experienced gopher, please correct me

[go-nuts] Re: Functions vs Methods: explain reasoning behind STD

2022-06-02 Thread atd...@gmail.com
A short way to see it for me is to reason in terms of capabilities. What is an instance of a given type supposed to be able to do? (method) versus what am I able to do with or upon a given instance (function). It's not always clear though but it can help. On Thursday, June 2, 2022 at 4:38:37 PM U