Re: [go-nuts] Re: How to refactor out this function

2018-08-08 Thread David Skinner
I think you should listen to James. He is quite right. Sometimes I am not thinking in English so a lot of people complain if I am the one who names things. And like James, I am always figuring out better ways to name things while making comments. RuneRead makes sense to me if I am thinking in

[go-nuts] Re: How to refactor out this function

2018-08-08 Thread Jim Bishopp
HelloSender can SendHello(). Sometimes I find better ways of naming things while adding comments, because the act of describing what something is and does surfaces name-smells. HelloSender can HelloSend(). wat? HelloSend is a polite thing to say when you finally meet Send. io.RuneReader wi

[go-nuts] Re: How to refactor out this function

2018-08-08 Thread Tong Sun
Thanks a lot for the input. Out of curiosity, for those action based functions, how would you name them using NounVerb combinations? For example, SayHi(), or PlayCards(), etc. thx On Wednesday, August 8, 2018 at 9:27:58 AM UTC-4, David Skinner wrote: > > I cannot speak for the community, o

[go-nuts] Re: How to refactor out this function

2018-08-08 Thread David Skinner
I cannot speak for the community, only for myself. I like to use NounVerb combinations that make sense with the package name. package.NounVerb() handles.HelloSend() I can then define the interface as VerbEr type HelloSender interface { HelloSend() } My son spent too many