Re: FYI: Ruby 1.6.0 - An object-oriented language for quick and easyprogramming
On Tue, 19 Sep 2000, Adam Turoff wrote: > On Tue, Sep 19, 2000 at 08:07:33AM -0700, Dave Storrs wrote: > > > I think I would be > > guardedly in favor of changing the default scope from global to local > > (although I have the feeling there is something I'm not considering). What > > does everyone else think? > > [the following is shown out of original order] > Really? You want a brand new $foo inside a while loop, distinct > from the one inside the surrounding sub? That is lost when the while > loop terminates? Urmm...I think maybe I just realized what it was that I wasn't considering. Never mind. Forget I said anything. *blush* Dave
Re: FYI: Ruby 1.6.0 - An object-oriented language for quick and easyprogramming
Dave Storrs wrote: > > >The default variable scope rules for Ruby (default: local) are > >much better suited for medium-to-large scale programming tasks; > >no "my, my, my" proliferation is needed for safe Ruby programming > > Actually, this is the bit that interests me. Most times, when you > create a variable, you *do* want local scope. I think I would be > guardedly in favor of changing the default scope from global to local > (although I have the feeling there is something I'm not considering). What > does everyone else think? There's been a big discussion on -strict on this. I invite you to join the list and check out RFC 106, which I feel is a pretty good proposal. But please, any further discussion on this needs to be on -strict, not here. Thanks. -Nate