From: Robert Klemme Date: 2011-01-18T18:44:23+09:00 Subject: Re: Why Quby? (was Re: What are your ruby rough cuts ?) On Sun, Jan 16, 2011 at 6:55 AM, Tony Arcieri wrote: > On Sat, Jan 15, 2011 at 5:34 PM, Christopher Dicely wrote: > >> > Ruby, interestingly enough, generally views state as immutable data. >> >> That's fairly misleading. There are lots of mutating operations in Ruby > > I don't mean to be condescending, but if that's your reaction, I don't think > you understand the meaning of the word "generally" Keeping the bang notation discussion aside I don't think that your quote correctly describes the situation in Ruby. Basically the state of an object is the transitive closure of all objects reachable through instance variables. There are two ways that state can change: 1. An instance variable somewhere in that graph is update to point to a different object. 2. An instance of a mutable core class changes its internal state (e.g. String#gsub!, Array#delete etc.). I don't see how you want to derive your statement about "state as immutable data" from this. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/