* [gentoo-java] Re: Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass
[not found] ` <20091118193748.3d80c4f3@gentoo.org>
@ 2009-12-08 10:24 ` Martin von Gagern
0 siblings, 0 replies; 2+ messages in thread
From: Martin von Gagern @ 2009-12-08 10:24 UTC (permalink / raw
To: gentoo-dev, gentoo-java; +Cc: Andrey Kislyuk, Christian Faulhammer
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)
^ permalink raw reply [flat|nested] 2+ messages in thread