Edit menu recipe?
ambassador at fourthworld.com
Mon Aug 23 11:50:37 EDT 2004
J. Landman Gay wrote:
> On 8/20/04 7:31 PM, Richard Gaskin wrote:
>> Yes, in older, slower xTalks one might get a noticeable difference
>> between "do" and the natural message path.
>> But it's a whole other world with Transcript -- this script tests
>> timing of both the natural message path and the "do" command:
>> So yes, using the do command is slower, but only by about 0.003ms.
>> Given that the menu script is responding to a user action and no user
>> will be faster than 0.003ms, there's no perceptable savings to the
>> system's performance, but using do can offer immediate savings for
>> developer productivity.
> The "lost" productivity in the script I submitted consists of typing an
> extra 5 words, which doesn't slow me down much.
There's no disputing tastes. Those extra words added up for me when I
was a one-handed typist for a year, but hopefully that's something few
My main point was just that I didn't want to leave folks with the
impression that using "do" was a mistake. Sometimes it's very useful,
and in Transcript the penalty is imperceptible, almost immeasurable.
> Continuing the curmudgeonliness: I'll keep doing it my way, I think. I
> am of the school that says loading the compiler unnecessaily is poor
> programming practice. A similar example would be in using unquoted
> literals; it works fine in many cases and doesn't really slow things
> down that much, but I don't use use them because they too are a poor
> habit to get into.
Fully agreed on unquoted literals: in addition to the reason you mention
there are two others:
- it's easier to skim code for strings when they're quoted
- unquoted literals break when explicitVars is on
Fourth World Media Corporation
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the Use-livecode