Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o, gentoo-java@g.o
From: Martin von Gagern <Martin.vGagern@...>
Subject: 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
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)


References:
Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass
-- Andrey Kislyuk
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass
Next by thread:
OSGI manifests and existing packages
Previous by date:
Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass
Next by date:
OSGI manifests and existing packages


Updated Mar 06, 2012

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.