implicitVars [Was: Re: Best Practices in Rev development]

Josh Mellicker josh at dvcreators.net
Fri Jul 6 13:24:04 EDT 2007


I have found the possibility of making a variable typing error is  
almost nil, but the primary reason for this is that I almost never  
type variable names. (except the first time :-)

It is faster and 100% accurate for me to use a feature I contributed  
to Galaxy called "ScriptPaint" to "paint" your variable names from  
existing instances rather than type them. (hover your cursor over a  
variable name (assuming you see it in your window) and press Cntrl- 
Space to add it to the line you're typing)

Even with the mouse movement it is usually faster than typing,  
especially if you tend to use longer, more descriptive variable  
names. Adding to the speed benefit is the ability to paint other  
words, commands, keywords, anything visible.

ScriptPaint is so cool I wish every text editor had it- I sometimes  
try to use ScriptPaint when writing an email, posting on a website,  
etc.!

I showed ScriptPaint to a RealBasic programmer once and he flipped  
out. That feature (among others) is making him consider adding Rev to  
his lineup.

Anyway, I agree declaring vars is a waste of time and makes scripts  
harder to read and navigate.


On Jun 29, 2007, at 2:19 PM, Chipp Walters wrote:

> On 6/29/07, Ken Ray <kray at sonsothunder.com> wrote:
>>  over the years of not declaring xTalk
>> variables I have gotten to the point that the likelihood of me making
>> an error in typing a variable is extremely low, so there really is  
>> very
>> little benefit and a lot of extra hassle for me to start declaring
>> them.
>
> I'm with Ken. I don't declare variables and have spent so many  
> hours working
> this way, it's just easier. I rarely if ever find a problem from not
> declaring vars, and the overhead of the typing and visual clutter is a
> nuisance and a time waste to me.



More information about the use-livecode mailing list