Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Curious compiler warning Date: Wed, 11 Jan 2012 23:23:41 -0500 Organization: A noiseless patient Spider Lines: 37 Message-ID: References: <9n64rgF40bU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 12 Jan 2012 04:23:44 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="HSlJAUb3pGXi3i7ZL/HoAw"; logging-data="11210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qHRwY+GQPkyu2mXuqXSWk" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 In-Reply-To: Cancel-Lock: sha1:OhT6YsjWmXDj3/i+sjwDOURo6PQ= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11258 On 1/11/2012 10:01 PM, Patricia Shanahan wrote: > On 1/11/2012 6:26 PM, Roedy Green wrote: >> On Wed, 11 Jan 2012 20:05:25 +0100, "Gavino" >> wrote, quoted or indirectly quoted someone who said : >> >>> It's nothing to do with not using the result - in the original >>> example, the >>> result *was* used. It's simply that assigning to a method parameter >>> value is >>> considered 'bad style', that's all. >> >> Normally I mark my parms final, but have modified them. I don't >> recall ever seeing that warning. I guess it does not show up in >> IntelliJ. > > I believe the warning originally came from Eclipse. The Eclipse style > rules are not carved in stone. A programmer who does not agree with the > default settings should change them. To my way of thinking, a method (or constructor) parameter is nothing more nor less than a local variable, taking its initial value from the caller's argument. One characteristic of a variable is that it can vary; that's why we don't call them invariables. I can see no reason to preserve a parameter's initial value in bronze like Baby's first shoes, and Eclipse's assertion that failing to bronze a parameter "is generally considered poor style" is merely noise, Proof By Iterated Assertion. (In the passive voice, which is generally considered poor style.) If anyone, anywhere, anyhow, has evidence that bronzing the parameters improves them, let the evidence (and not just the PBIA) be produced. Until then, I'll leave my parameters unbronzed and still wearable. -- Eric Sosman esosman@ieee-dot-org.invalid