From: Gavin Sinclair Date: 2002-08-15T23:51:05+09:00 Subject: Re: Thought question: Where does "new" come from? From: "Hal E. Fulton" > I've been brooding again on the circularities > in Ruby's classes. > > Now I'm thinking of a particular question: > How would you explain where "new" comes from > in a class? > > It's easy to say that all classes are objects > of the type Class. > > So for example, Object has a "new" because it's > a Class. But on the other hand, Class is an > Object. > > Would you say that Object gets "new" from Class, > or vice versa? Or neither? Or should I just not > worry about it? That's pretty easy. "ARGV is an instance of Array, so I can call reverse on it." "Object is an instance of Class, so I can call new on it." > This arose because I was trying to draw a picture > of Ruby's entire object model. > > Comments, anyone? Matz, Dave, Guy, David? Others? > > It's 1:35 a.m. my time. I should go to bed. I've > probably said something incorrect in this email. The main circularity in Ruby is as follows: it's really easy to use and saves you haves of time, but then you waste time playing with it. > > Hal > Gavin