From: Curt Hibbs Date: 2005-03-15T21:05:28+09:00 Subject: Re: Autovivification & Javascript (was Re: [ANN] Getting Started with Orbjson tutorial) Nick Woolley wrote: > > Hello, > > Curt Hibbs wrote: > > I agree. In fact it was my positive experiences with JavaScript that > > attracted me to Ruby. > > > I've had positively *painful* experiences with ActionScript (a variety > of ECMAscript). The main pain was in the debugging of small errors, > often introduced during refactoring. A misspelt variable comes to life > like a gremlin and things break mysteriously. Add to this ActionScripts > byzantine scoping rules (which Javascript may lack). Tracking it down > requires binary-search style debug prints, and wasted so much of my time > I was tearing my hair out. I've had problems with that level of frustration in *every* language I used (which must be over 15, by now)! > In fact one of the things which worries me a bit about Ruby, as a > newcomer, is that instance variables come to life in the same way - no > variable declarations. > > I'm curious if you liked JavaScript despite that, or if you found a way > around it? Likewise, is autovivification an issue in Ruby I should > beware of? Its happened, although for me its been only a minor annoyance in Ruby because my methods tend to be *very* short and using test-driven development catches such errors fast. Curt