From: Brian Candler Date: 2003-07-17T04:28:28+09:00 Subject: Re: Other languages' features in Ruby On Thu, Jul 17, 2003 at 04:14:26AM +0900, Austin Ziegler wrote: > On Thu, 17 Jul 2003 02:20:25 +0900, Brian Candler wrote: > > would give warnings about "gets", "chomp!" and "puts" being used only > > once in the source file... > > Not chomp! -- AFAICT, the only place that ? and ! are allowed are on method > names. Oh yes, thanks for pointing that out. But I think the point stands: it is not useful to warn on "a = foo" when foo doesn't appear anywhere else in the source file, because it could legitimately be a method of the object or one of its ancestor classes. Even if there were declarations for local variables it wouldn't make sense: my :foo # hypothetical declaration puts foob # foob could still be a method So, without introducing syntax for variables (%foo) or eliminating the default receiver (self.puts self.foob) then I don't think there's a way to give a useful warning for this case. Like I say, it used to worry me, since Perl did catch quite a few of my typos in that way, but now I just run my test suite and pick up the typos there... Regards, Brian.