Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #702

Re: Why would one use += 1 at the place of ++?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.help
Subject Re: Why would one use += 1 at the place of ++?
Date Thu, 19 May 2011 15:29:25 -0400
Organization albasani.net
Lines 14
Message-ID <ir3r1m$3a3$1@news.albasani.net> (permalink)
References <8762p7upgn.fsf@merciadriluca-station.MERCIADRILUCA> <rdkat61r05d1tg2ensmo9og2l3dt08pi7d@4ax.com> <87mxiijyc2.fsf@merciadriluca-station.MERCIADRILUCA>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net 5qc17UASMKdrc2QTTFhsuCdmNj0Z8k3Xghg4+CsNA+AgMh507RvQp0pyST8AVD5ebruxGJ2nZzjs1DQuTYJj2S8v00H55nfqf2D/wrgY2XYwv0nfqSchwFIE3XTC5D4G
NNTP-Posting-Date Thu, 19 May 2011 19:28:54 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="FPlkPXJZbo/jTfmPCPNB36mVDcRoh1Fnum8AFIed6c8SMX4gzhVI3Xfshn7Ue4eA3HaD02odEAVC1i8krlcE6tjK6kfUbJrSlJ4QvZONJ2BLgV8KjDLHKaiMYMxktkk4"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
In-Reply-To <87mxiijyc2.fsf@merciadriluca-station.MERCIADRILUCA>
Cancel-Lock sha1:3EWAvoFpR1ISw+PRYWEIKIjsChI=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.help:702

Show key headers only | View raw


Merciadri Luca wrote:
> Roedy Green writes:
>> But in general, I would use ++ since it is shorter and hence faster
>> and more easy to proofread.

> Sure, me too.

Just be aware of the semantics, and the difference between prefix and postfix 
increment.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.help | Previous | NextPrevious in thread | Find similar


Thread

Why would one use += 1 at the place of ++? Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-05-19 09:19 +0200
  Re: Why would one use += 1 at the place of ++? Bent C Dalager <bcd@pvv.ntnu.no> - 2011-05-19 10:22 +0000
  Re: Why would one use += 1 at the place of ++? David Lamb <dalamb@cs.queensu.ca> - 2011-05-19 06:40 -0400
    Re: Why would one use += 1 at the place of ++? Jeff Higgins <jeff@invalid.invalid> - 2011-05-19 07:58 -0400
    [OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 08:03 -0400
      Re: [OT] Re: Why would one use += 1 at the place of ++? Patricia Shanahan <pats@acm.org> - 2011-05-19 07:35 -0700
        Re: [OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 22:57 -0400
          Re: [OT] Re: Why would one use += 1 at the place of ++? rossum <rossum48@coldmail.com> - 2011-05-20 11:00 +0100
          Re: [OT] Re: Why would one use += 1 at the place of ++? Patricia Shanahan <pats@acm.org> - 2011-05-20 12:55 -0700
      Re: [OT] Re: Why would one use += 1 at the place of ++? David Lamb <dalamb@cs.queensu.ca> - 2011-05-19 17:58 -0400
        Re: [OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 23:13 -0400
    Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 08:43 -0400
  Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 07:51 -0400
  Re: Why would one use += 1 at the place of ++? Jeff Higgins <jeff@invalid.invalid> - 2011-05-19 08:03 -0400
    Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 08:08 -0400
  Re: Why would one use += 1 at the place of ++? Roedy Green <see_website@mindprod.com.invalid> - 2011-05-19 10:23 -0700
    Re: Why would one use += 1 at the place of ++? Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-05-19 21:15 +0200
      Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 15:29 -0400

csiph-web