From: Csaba Henk Date: 2005-01-26T07:10:48+09:00 Subject: Re: top-level object? top-level methods? On 2005-01-25, itsme213 wrote: > Is so, why are top-level methods not made singleton-methods on this object, > instead of being pulled in as instance methods on the Object class itself > (and hence into all other classes i.e. more namespace pollution than is > usually intended). This would still allow top-level methods to call other > top-level methods. And if the top-level object were referred to by some > constant like Main, then those methods could be called from anywhere with > Main.method(...). * If you are in an interactive session, or create a 10-line script to parse stdin which looks like sanitized perl, you don't care about namespace pollution. * If you write a "proper" ruby program, you encapsulate your code into Classes/Modules anyway. So I think the toplevel namespace pollution is not an issue... Csaba