From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NHxGy-00062k-UI for garchives@archives.gentoo.org; Tue, 08 Dec 2009 10:26:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9184AE0648; Tue, 8 Dec 2009 10:25:42 +0000 (UTC) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by pigeon.gentoo.org (Postfix) with SMTP id 1AC07E0648 for ; Tue, 8 Dec 2009 10:25:41 +0000 (UTC) Received: (qmail invoked by alias); 08 Dec 2009 10:24:14 -0000 Received: from p5DD60D6A.dip0.t-ipconnect.de (EHLO [192.168.71.44]) [93.214.13.106] by mail.gmx.net (mp050) with SMTP; 08 Dec 2009 11:24:14 +0100 X-Authenticated: #858129 X-Provags-ID: V01U2FsdGVkX1/CvB1MBaTCFFVNoWUA+lG2rW4oDMxqb64KsNHtUF v2CUsmiUQIcVZ1 Message-ID: <4B1E294B.70906@gmx.net> Date: Tue, 08 Dec 2009 11:24:11 +0100 From: Martin von Gagern User-Agent: Thunderbird 2.0.0.23 (X11/20091205) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org, gentoo-java@lists.gentoo.org CC: Andrey Kislyuk , Christian Faulhammer Subject: [gentoo-java] Re: Code review and main tree inclusion for java-mvn-src.eclass and java-pkg-simple.eclass References: <17e1a1290911170922q7a27b7b3t55aeca55397401ea@mail.gmail.com> <17e1a1290911180459j2c458e7bleb8c2727b1f9a321@mail.gmail.com> <20091118193748.3d80c4f3@gentoo.org> In-Reply-To: <20091118193748.3d80c4f3@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 X-Archives-Salt: 1cca060a-9055-43d0-90b7-da68c64796b6 X-Archives-Hash: c98c447c4344cf5a2ab56b5b59759757 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)