--0016369208c4343c6b047783daa3
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 30, 2009 at 12:03 PM, Rick DeNatale <rick.denatale / gmail.com>wrote:

> I think that theres a more fundamental problem with ++ in a language
> like ruby, which has to do with the difference between objects and
> variables.
>

Personally I see nothing interesting about the behavior of ++ in any mutable
state language.


> Now, consider not immutable objects, but defining ++ for a mutable
> object.  I've named the method plus_plus instead of ++ since I can do
> the former, but not the latter.
>

How is ++ any different from << except for << taking an argument? (given
hypothetical C-like ++ behavior)

There is already extensive precedent in Ruby for destructive method calls
that mutate state, and they all lead to the same confusion.

There is nothing interesting with Ruby in this regard, except that Ruby does
seem to go out of its way to do things immutably by default, which, in my
opinion, is pretty cool.  But in the end Ruby is still very much a mutable
state language.

-- 
Tony Arcieri
Medioh/Nagravision

--0016369208c4343c6b047783daa3--