From: Brent Roman Date: 2009-05-06T11:31:15+09:00 Subject: [ruby-core:23364] Re: [Feature #1432] decrement and increment Why is a+=1 less elegant than ++a However, I admit that using (x=a; a+=1; x) to replace a++ is pretty evil looking. (The postfix variants *are* a pain to emulate correctly) Are there other commonly used languages besides 'C' that support the ++ and -- operators? I always thought they were added to 'C' primarily to support efficient pointer arithmetic -- something quite foreign to Ruby. - brent Nobuyoshi Nakada-3 wrote: > > Issue #1432 has been updated by Roger Pack. > > > at times I do miss the elegance of being able to do ++ > though it does hide the fact that it's internally assignment. Primitives > aren't quite as objecty as "normal" objects, so might be an appropriate > fit. Just thinking out loud. > -=r > ---------------------------------------- > http://redmine.ruby-lang.org/issues/show/1432 > > ---------------------------------------- > http://redmine.ruby-lang.org > > > -- View this message in context: http://www.nabble.com/-ruby-core%3A23357---Feature--1432--decrement-and-increment-tp23366229p23399031.html Sent from the ruby-core mailing list archive at Nabble.com.