Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: borrowing Constants Date: Sat, 24 Sep 2011 18:18:06 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 25 Sep 2011 01:18:13 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="2044"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+j9+cZJHR+kX2Pej/Q+OkqxZfFxRTB7As=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: Cancel-Lock: sha1:v3wcUp54WZLywlspkZweqjbvd94= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8275 On 9/24/2011 5:09 PM, Roedy Green wrote: > Another rule of thumb may be, instead of cross linking classes with > references to each others constants, refactor out the constants to a > third class, and reference it Generally, no. It's been tried, and found to not work well. A class full of unrelated constants is just that: a class full of unrelated constants. Put the constants where they belong. Use a decent build system capable of figuring out what needs to be compiled. > or extend it. Dear god no. Known bad practice. Avoid!