Re: copy & set statements
Re: copy & set statements
- Subject: Re: copy & set statements
- From: Timothy Bates <email@hidden>
- Date: Tue, 23 Oct 2001 10:55:57 +1000
>
On 22/10/01 9:25 PM +1000, Doug McNutt, email@hidden, wrote:
>
> How anyone can believe that "natural English" is easier than
>> x = a;
>> x = *a;
>> x = &a;
In human those are
Set x to whatever a is
Set x to point to a
Set x to what a points to
In AppleScript
Set x to a
Set x to a reference to a
Copy a to x
The only "trouble" in AppleScript is that this is a few more key strokes and
that x often gets to be a reference without your explicity knowing.
The keystrokes issues is compensated by readability for people who don't
spend 4 hours a day or more reading code or who, like me, have limited short
term memory :-).
The implicit refererenceing and defreferenceing is easily avoided by
habitually using "copy"
Actually, the first book I got (Tao of AppleScript) used this a lot. It was
a good habit that I never learned.
Tim