From: Trans Date: 2006-08-21T14:10:03+09:00 Subject: Re: using a module at the toplevel doesn't work Yukihiro Matsumoto wrote: > Hi, > > In message "Re: using a module at the toplevel doesn't work" > on Sun, 20 Aug 2006 09:30:11 +0900, "Trans" writes: > > |http://7rans0noma.blogspot.com/2006/08/vote-kernel-for-toplevel-object.html > > I don't feel that making Kernel as toplevel self is not a good idea, > because: > > * toplevel def does not define methods on Kernel, but Object. > * toplevel include does not include modules into Kernel, but Object. > * toplevel private etc. do not work on Kernel, but Object. To keep the namespace separate I take it? In general one can hardly tell them apart. I know I was very suprised when I discoverd that Object starts out completely devoid of any methods. And I suspect now, that toplevel's effect on Object is the reason why. So by what you say I would be inclined to wonder why isn't toplevel Object itself rather than a special instance of Object. But the reaon it cannot be Object is because Object can not 'extend self' like toplevel must. So if not Kernel and also not Object, what of the merits of separate module Main, included in Object. SomeClass.ancestors => [ Object, Main, Kernel ] So that what I am trying to undersatnd. Why would you go to the trouble to make the toplevel a (partial) proxy of Object when a self extended module would prioved complete and seemless functionality? Thanks, T.