Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.help Subject: Re: Why would one use += 1 at the place of ++? Date: Thu, 19 May 2011 10:23:59 -0700 Organization: Canadian Mind Products Lines: 24 Message-ID: References: <8762p7upgn.fsf@merciadriluca-station.MERCIADRILUCA> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:699 On Thu, 19 May 2011 09:19:52 +0200, Merciadri Luca wrote, quoted or indirectly quoted someone who said : >I've heard that it is generally better to use += 1 at the place of ++. Who said that? It would be better for: private static final int INCREMENT = 1; x += INCREMENT ; because then your can change the value more easily. But in general, I would use ++ since it is shorter and hence faster and more easy to proofread. -- Roedy Green Canadian Mind Products http://mindprod.com How long did it take after the car was invented before owners understood cars would not work unless you regularly changed the oil and the tires? We have gone 33 years and still it is rare to uncover a user who understands computers don't work without regular backups.