Re: [RFC PATCH v3 0/8] Remote helpers smart transport extensions
- From
Jeff King <peff@peff.net>
- Date
- Dec 8, 2009, 05:57 UTC
- Message-ID
- <20091208055735.GA9951@coredump.intra.peff.net>
- In-Reply-To
- <7vein635vn.fsf@alter.siamese.dyndns.org>
On Mon, Dec 07, 2009 at 12:07:24PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> I haven't asked people why they choose to write like this: > > char* string; > > beyond "that is how we were taught and what we are used to".
I have seen it in C++ code and recommended many years ago on comp.lang.c++. The argument was something along the lines of:
1. It's good to keep type information together, especially in C++
where you are often doing things like using types as template
parameters. 2. The fact that "char* foo, bar" doesn't do what you want isn't
relevant if you have a style guideline not to declare two variables
on the same line (because it's easier to notice both if they each
get their own line, and because in C++ you can declare closer to
the point of use).But that is me paraphrasing an argument I read on usenet almost 10 years ago, so I may be entirely misremembering (and please don't flame me; I am presenting it for anthropological curiosity, not because I believe we should use that style).
-Peff