On 2010-02-16, lith <minilith / gmail.com> wrote:
>> ++ and -- modify their receivers. ?Since Ruby's Numeric types are immutable,
>> they cannot be modified. ?So the only solution is to implement ++ and -- as
>> assignment operators.

> Other languages solve similar problems by providing references/
> pointers to variable or with macros etc.

I don't think allowing references or pointers to variables would be good.
Variables are not objects, they're references already.

> This isn't about immutability.

In practice it is, because when people say "x++", they don't want the variable
x to refer to a new object, they want the object x refers to increased.

-s
-- 
Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nospam / seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!