From: Robert Feldt Date: 2001-10-27T14:04:23+09:00 Subject: [ruby-talk:23596] Re: Fast reply needed: class var trouble On Sat, 27 Oct 2001, Ralph Mason wrote: > > I'm wondering if you're talking from some bad experiences here, or if > > this is an observation based on preferences. The reason I ask is that > > I've been coding Ruby for a fair while now and I've never once felt > > the need to declare variables. As always, I'm interested in other > > opinions. But I suspect that this is a change you're unlikely to see, > > as it would change the character of the language dramatically. > > I'm not so sure that it would change the language much at all > > something as simple as > > var a,b,c,d #define some local variables > > a = 6 > e = 7 #this line give error unknown variable or some such > > The need to declare them could be turned at a file level on much like the vb > 'option expilicit' statement. > > It doesn't seem like this would be particularly complicated thing to > implement. > > It really does stop bugs, and any bugs that the language can stop for you is > a good thing and saves your time. > No, no no. Not needing declarations is one of the things making Ruby Ruby to me. So I could never live with the knowledge that such a change would have started with a post I did while half a sleep... ;-) /Robert