From: Ralph Shnelvar Date: 2009-11-28T20:35:16+09:00 Subject: Re: Class variables, instance variables, singleton; Ruby v. C++ DM> On Friday 27 November 2009 05:00:32 pm Ralph Shnelvar wrote: >> I am clueless what all of the above does. It is WAY over my head. DM> I don't really know what to say, then, other than: DM> What is it you don't get? DM> I don't mean to be cruel, but there isn't a technical question in here -- not DM> really something that I can answer. Instead, all you have is this: >> How would I go about deciphering the meaning of what you wrote, above? DM> Ask me, or ask the group. But ask something specific. It is the gestalt ... the world-view ... that I am not getting. It is not the specifics that are the difficulty. DM> For example: Is it that you don't understand what I'm doing with 'def DM> self.whatever'? Or is it that you don't understand what self.class is? Or are DM> the words "Foo" and "bar" confusing? Maybe it was += that threw you off? DM> I could go through and attempt to explain every detail of how it works, and I DM> could probably do a good job, but it'd be a lot of effort on my part (better DM> spent writing a "how to program" book), and you'd probably find it pretty DM> condescending. DM> Also: Open up irb and mess around. See what happens. For example, type this DM> into your irb shell: DM> class Foo DM> self DM> end DM> What does that return? Did you learn anything? DM> In other words: One very good way to learn is through experimentation. Run the DM> examples I've given and see what they do. Run them in a debugger, or sprinkle DM> a few 'puts' statements to see what's going on. Run them in irb, and play with DM> different versions of them. David, I thank you for trying to help. There is a gestalt here that I am missing. As the original poster, I said I'm coming from a C++ environment. I'm actually pretty good there. Well, more than pretty good. I've had SNOBOL, SPITBOL, and APL (several years) experience. I'm familiar with interpreted code. So ... there's something at a high level that is going on in your code that I'm unable to wrap my head around.