From: Benoit Daloze Date: 2009-12-23T02:10:18+09:00 Subject: Re: Ruby's implementation of Fixnum-assignment --001636416c9f9049b1047b54471c Content-Type: text/plain; charset=ISO-8859-1 I believe Matz decided against because a) there is a pretty short idiom which does this already ("a += 1") and b) that existing idiom has an equals sign in there thus making the assignment obvious; "++a" on the contrary does not have an equals sign anywhere and thus would obscure the fact that under the hood an assignment is taking place. This would make the code harder to read while not bringing any benefits to the language. I would add than using i += 1 is often doing it the wrong way in Ruby. We use Enumerable most of the time, and try to not create any index (because that's awful, you need an initialization(i=0), a step to go forward(i+=1), and you keep a useless index at the end). If you really need an index, you can always use #upto , #downto or #step. Every time you need an index (that means the index of the Enumerable thing you're iterating is meaningful), you should use #each_with_index or #with_index. For example, This is my last contribution to RPCFN 4 (pretty-printing Polynomials): http://github.com/eregon/RPCFN4/blob/master/solutions/benoit_daloze.rb Look at the usage of #each_with_index, followed by inject. --001636416c9f9049b1047b54471c--