From: Pit Capitain Date: 2003-02-03T16:33:29+09:00 Subject: Re: Local variables & blocks On 2 Feb 2003 at 23:40, Yukihiro Matsumoto wrote: > In message "Re: Local variables & blocks" > on 03/02/02, Brian Candler writes: > > |When you assign to 'x' within a block, it has two > |entirely different behaviours, depending on whether 'x' was in existence > |previously or not. > > I agree with you. I was insane when I designed this rule. That's why > I propose the change. But I don't think we can just drop block local > variables like yours, since we have Proc (some kind of anonymous > function), we need some kind of local variables of their own. Don't be so harsh to yourself! Nobody's perfect. I like your proposed change. It doesn't offer all the flexibility that has been talked about in the last couple of months, yet it is simple (as simple as it can get?) and doesn't change the feeling of the language. I wonder how you'd design scoping rules for Ruby if you could start from scratch. Would it be like the proposed solution or something different? Regards, Pit