From: Austin Ziegler Date: 2010-09-09T01:51:32+09:00 Subject: [ruby-core:32157] Re: Ruby 2.0 Wiki/Wish-list? On 2010-09-08, at 11:39, Roger Pack wrote: >> |++x and x++ > >> I have already rejected this idea many times. >> >> But just for curiosity, how do you define the semantics of x++ and >> ++x, where you don't have explicit type for variables in Ruby. >> For x += 1, it's easily defined as x = x + 1, but not that easy for >> x++ and ++x. > > ++x is (y = x; x=x+1; y) (y is anonymous--basically just a return value) > x++ is (x = x+ 1) as noted. > > I think that's how C does it. x = "q" x++ How does that work? -a �� from my iPad >