On 29 Aug 2008, at 08:04, Robert Dober wrote:

> On Fri, Aug 29, 2008 at 7:27 AM, David Masover <ninja / slaphack.com>  
> wrote:
>> On Thursday 28 August 2008 16:25:59 Joel VanderWerf wrote:
>>> John Pritchard-williams wrote:
>>>> I did check my Ruby books by the way, but they just "unlike C  
>>>> there is
>>>> no ++ operator in Ruby...." :)
>>>
>>> In ruby, operators are methods and they operate on objects, not on
>>> variables.
>>
>> That's not really a valid reason, and not entirely true -- there is  
>> no +=
>> method for you to define. It behaves as though it's a macro:
> You are right of course, the original question was, why is there no
> x++ as syntactic sugar for x = x + 1.
> No idea ;).

Although it usually isn't quite the same as just x = x + 1 (that's  
more like ++x) so it's slightly more tricky that just +=

Fred