From: Ryan Anderson <ryan@michonline.com>
To: Fredrik Kuivinen <freku045@student.liu.se>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Add git-annotate, a tool for assigning blame.
Date: Tue, 28 Feb 2006 03:47:37 -0500 [thread overview]
Message-ID: <20060228084737.GA13537@mythryan2.michonline.com> (raw)
In-Reply-To: <20060228082736.GA4593@c165.ib.student.liu.se>
On Tue, Feb 28, 2006 at 09:27:36AM +0100, Fredrik Kuivinen wrote:
> On Mon, Feb 20, 2006 at 04:01:56PM -0800, Junio C Hamano wrote:
> > Fredrik Kuivinen <freku045@student.liu.se> writes:
> >
> > > I have also been working on a blame program.
>
> ...
>
> > BTW, these days I always compile things with
> >
> > -Wall -Wdeclaration-after-statement
> >
> > which caught quite a many.
>
> Just out of curiosity, why do you prefer declarations before
> statements?
I won't speak for Junio, but the explanations I've heard in the past are
basically:
1) It keeps all declarations in one spot.
2) If your function is complicated enough to not need a variable until
fairly far into the function, it probably should be two (or more) functions.
Basically, I think that there's not wrong with doing it that way, per
se, just that it's sometimes a symptom of other problems, so fi you look
for the symptom, the problem sometimes is more obvious.
--
Ryan Anderson
sometimes Pug Majere
next prev parent reply other threads:[~2006-02-28 8:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-20 10:46 [PATCH] Add git-annotate, a tool for assigning blame Ryan Anderson
2006-02-20 22:54 ` Junio C Hamano
2006-02-20 23:40 ` Fredrik Kuivinen
2006-02-21 0:01 ` Junio C Hamano
2006-02-28 8:27 ` Fredrik Kuivinen
2006-02-28 8:38 ` Junio C Hamano
2006-02-28 8:47 ` Ryan Anderson [this message]
2006-02-28 9:08 ` Andreas Ericsson
2006-02-23 22:10 ` Ryan Anderson
2006-02-23 22:55 ` Fredrik Kuivinen
2006-02-24 0:00 ` Johannes Schindelin
2006-02-24 0:17 ` Junio C Hamano
2006-02-24 0:52 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2006-03-02 5:16 [PATCH 0/3] Annotate updates Ryan Anderson
2006-03-02 5:16 ` [PATCH] Add git-annotate, a tool for assigning blame Ryan Anderson
2006-03-02 5:20 ` Ryan Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060228084737.GA13537@mythryan2.michonline.com \
--to=ryan@michonline.com \
--cc=freku045@student.liu.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).