Best Practices in Rev development
kray at sonsothunder.com
Wed Jun 20 18:11:33 EDT 2007
On Wed, 20 Jun 2007 14:21:17 -0700, Richard Gaskin wrote:
> Devin Asay wrote:
>>> Declare your local variables and enable the "variable checking by
>>> 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?
Actually, I have a stack I made that allows you to develop without
local declarations and then after the fact run this utility and it will
add the declarations for you. :-)
Best of both worlds...
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the Use-livecode