Re: Preferred wrapping for long function declarations

2014-05-14 Thread John Meinel
I've personally found it quite edifying to see what William and Nate like, and while I don't think we should enforce a One True Way, I have tweaked my own preferences a bit from the discussion. Somewhere between 3 an William's 3. I don't really prefer Nate's 3 because the args aren't wrapped the

Re: Preferred wrapping for long function declarations

2014-05-14 Thread Frank Mueller
Sure, I like the discussion too and it has been interesting to see what gofmt thankfully else accepts There have been some formats I never tried before. mue On Wed, May 14, 2014 at 9:53 AM, John Meinel j...@arbash-meinel.com wrote: I've personally found it quite edifying to see what William

Re: Preferred wrapping for long function declarations

2014-05-13 Thread William Reade
I personally favour a variant of (3), without necessarily requiring that every param get its own line: ie func (c *CustomCaller) MethodCaller( rootName string, version int, methodName string, ) ( rpcreflect.MethodCaller, error, ) { ... } ...so that there's clear visual distinction between

Re: Preferred wrapping for long function declarations

2014-05-13 Thread Nate Finch
Personally, I find #3 to be very hard to read. It's very difficult for me to look at the signature and find the return values, and it's hard for me to determine where code starts. My preference is for #1 - let it wrap, and just try to use short names and few arguments so as to avoid it most of

Re: Preferred wrapping for long function declarations

2014-05-13 Thread Nate Finch
I was twiddling with gofmt, and I stumbled on this format, which is a lot more readable for me, if we want to wrap long lines: func (c *CustomCaller) MethodCaller( rootName string, version int, methodName string, ) (rpcreflect.MethodCaller, error) { } On Tue, May 13, 2014 at 12:03 PM, Nate

Re: Preferred wrapping for long function declarations

2014-05-13 Thread Tim Penhey
I'm in general agreement with Dave. I don't think it really matters too much as long as gofmt keeps it sane. As we have already found, everyone will have differing opinions about this, and I'm not going to share mine here. While I understand the desire to get consensus on this topic, we have a

Re: Preferred wrapping for long function declarations

2014-05-12 Thread David Cheney
I don't want to have this bikeshed - I vote for people to use their best judgement and permit anything which fits through gofmt. On Tue, May 13, 2014 at 3:37 PM, John Meinel j...@arbash-meinel.com wrote: In the risk of running a bikeshedding paint-fest, I'm curious what the best-recommended