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
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
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
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
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
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
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