From: Robert Dober Date: 2010-10-22T23:59:50+09:00 Subject: Re: Why is top-level an object rather than just Object? On Fri, Oct 22, 2010 at 11:51 AM, John Mair wrote: > Why is it that top-level isn't just the Object class itself? what's the > rationale behind the 'main' object? Well the Object object, happening to be a module too (read class if you prefer), is the parent of all ( almost all in Ruby 1.9) instances in a Ruby program. For me it seems quite a good choice to use an instance of Obejct to represent the top most "self" in a Ruby program. It might be an instance of a special class like Toplevel (being a singleton presumably), I would prefer that, but the actual approach is a pragmatic one that is quite ok. Now talking about your idea of main == Object I fail to see what that should be good for. It is surely not the role of the (almost in Ruby 1.9) most general class in Ruby to carry the responsabilities of main. Cheers R > -- > Posted via http://www.ruby-forum.com/. > > -- There are worse things than having people misunderstand your work. A worse danger is that you will yourself misunderstand your work. -- Paul Graham