From: hal9000@... Date: 2000-09-01T06:40:02+09:00 Subject: [ruby-talk:4705] new, initialize, etc. I'm seeking an overview of this stuff. I am rather used to constructors and destructors (as in C++ and Java, and Eiffel which I've only read about), though I don't object to the way Ruby does things. As I see it, new is typically a class method which invokes the initialize method. First of all, why? I guess I can understand new being a class method, but why is initialize named differently? Why not just define new for the class and put the initializing code in there? Second, I've read a little about finalizing objects; I'm not sure why or when to do it. And why do it that way, rather than just provide a method to be called by the GC when the object dies? Finally, how are BEGIN and END supposed to be used? I've read what they do -- it seems to me they would be useful for modules -- but I don't actually grasp them. Are they completely unrelated to the concept of creating and destroying objects? Hal -- Hal Fulton Sent via Deja.com http://www.deja.com/ Before you buy.