Best Practices in Rev development

Richard Gaskin ambassador at fourthworld.com
Wed Jun 20 17:21:17 EDT 2007


Devin Asay wrote:
>> Declare your local variables and enable the "variable checking by  
>> default"
>> option.
>> It will help prevent typos and cut down your debugging time.
> 
> Right. On this one I have to weigh the gain of catching typos against  
> the pain of giving beginning students yet One More Thing to remember  
> while they're struggling to get their heads around the whole idea of  
> variables.

These days I find myself on the fence again on this one.

While I'm attracted to it in principle, because variable declarations 
are optional I find myself enjoying turning that off while designing new 
code, since it's hard to know in advance what vars I'll be using and 
they tend to change as I refine the code.

The downside to this is that if I later turn on explicitVars I need to 
go back and add all those declarations; in the heat of meeting 
deadlines, I'll admit I rarely do.

So given the freedom of not using explicitVars while fleshing out 
algorithms, is it really a valuable thing and I'm just lazy?

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list