public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Martin von Gagern <Martin.vGagern@gmx.net>
To: gentoo-dev@lists.gentoo.org, gentoo-java@lists.gentoo.org
Cc: Andrey Kislyuk <weaver@gentoo.org>,
	 Christian Faulhammer <fauli@gentoo.org>
Subject: [gentoo-java] Re: Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass
Date: Tue, 08 Dec 2009 11:24:11 +0100	[thread overview]
Message-ID: <4B1E294B.70906@gmx.net> (raw)
In-Reply-To: <20091118193748.3d80c4f3@gentoo.org>

Christian Faulhammer wrote:
> java-pkg-simple:
> In my eyes, defining all local variables at the beginning of a function
> makes it easier to read.

Sorry, Fauli, i totally missed your mail as it was only addressed to
gentoo-dev, while I've been intently watching gentoo-java...

java-pkg-simple_src_compile() was designed in a modular fashion, with
blocks for compile, javadoc and package which are pretty much
independent from one another. That's the reason why every one of these
blocks has its own local variables, instead of a single set of locals
for the whole function.

Originally I wrote them as independent functions, and they might well be
turned into such independent functions by adding a few function headers
and braces. So if ever the need arises, that's what I'd do. Splitting
locals would increase the footprint of such a change.

From my #gentoo-java log from 2009-01-03:
(11:24:36 UTC) MvG:
java-pkg-simple_src_compile has five clear parts; would it make sense to
place these in separate functions? This would allow more flexibility for
ebuilds that want to use some but not all of these.
(11:26:20 UTC) ali_bush:
MvG:  up to you,  if they are clear, they could alway be separated out later

To sum things up: yes, I could change the local declarations, but I'd
rather keep things as they are, unless you object more vehemently.

Greetings,
 Martin von Gagern (MvG)



      parent reply	other threads:[~2009-12-08 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <17e1a1290911170922q7a27b7b3t55aeca55397401ea@mail.gmail.com>
2009-11-18 12:59 ` [gentoo-java] Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass Andrey Kislyuk
     [not found]   ` <20091118193748.3d80c4f3@gentoo.org>
2009-12-08 10:24     ` Martin von Gagern [this message]

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=4B1E294B.70906@gmx.net \
    --to=martin.vgagern@gmx.net \
    --cc=fauli@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=gentoo-java@lists.gentoo.org \
    --cc=weaver@gentoo.org \
    /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