Revolution Studio strong suggestion
Posted: Mon Feb 11, 2008 10:11 am
Hi all,
I've been using Rev Studio for a while and I really enjoy it. However, I kept encountering frustration due to global variables not being declared in all procedures. I appreciate Revolution's approach to variable usage without declaration. Heck, in the beginning, I thought it was a Godsend. I shook my head at the other languages I use and their pesky insistence on variable declarations.
However, with enough time, I've realized that the freedom to make new variables willy-nilly without a peep is a recipe for disaster. Typos go undetected. Even if you are a careful typer, sometimes (at least for me), I decide to use a variable globally, that was originally going to be local.
So, I would urge everyone to click the option in preferences "always use explicit variables". It may take some time to declare all of your locals, but you won't be sorry in the long run. You will almost certainly save time as I can't imagine any Revolution scripter avoiding lengthy debugging sessions because of this willy-nilly variable setting.
If you prefer the default of never having to declare variables, how in the world do you avoid bugs (or at least time-consuming bugs)?
I've been using Rev Studio for a while and I really enjoy it. However, I kept encountering frustration due to global variables not being declared in all procedures. I appreciate Revolution's approach to variable usage without declaration. Heck, in the beginning, I thought it was a Godsend. I shook my head at the other languages I use and their pesky insistence on variable declarations.
However, with enough time, I've realized that the freedom to make new variables willy-nilly without a peep is a recipe for disaster. Typos go undetected. Even if you are a careful typer, sometimes (at least for me), I decide to use a variable globally, that was originally going to be local.
So, I would urge everyone to click the option in preferences "always use explicit variables". It may take some time to declare all of your locals, but you won't be sorry in the long run. You will almost certainly save time as I can't imagine any Revolution scripter avoiding lengthy debugging sessions because of this willy-nilly variable setting.
If you prefer the default of never having to declare variables, how in the world do you avoid bugs (or at least time-consuming bugs)?