Re: (2 of 2) Application Scripting Question - Theoretical? (was Re: Technote 2106 is da Bomb)
Re: (2 of 2) Application Scripting Question - Theoretical? (was Re: Technote 2106 is da Bomb)
- Subject: Re: (2 of 2) Application Scripting Question - Theoretical? (was Re: Technote 2106 is da Bomb)
- From: Michael Terry <email@hidden>
- Date: Wed, 14 Apr 2004 11:04:24 -0700
On Apr 14, 2004, at 6:46 AM, Nigel Garvey wrote:
When compiling the line:
set L's contents to {3, 4}
... the compiler has no idea what L will be or what its contents will
be.
The most reasonable assumption, given the language specification, is
that
L will be a reference and that it's contents will be either another
variable or a property. The sensible and reasonable course in this case
is to generate code that will assign the single list value {3, 4} to
whatever variable or property 'L's contents' refers to when the code's
run.
OK, you make a good point. But you have to understand that I consider
that an implementation detail which doesn't take priority over language
usefulness. Conceptually, you can set a variable, use the 'contents'
operator to set what's inside a variable, set a list of variables,
and--since the contents operator works on lists, too, in a usefully
analogous way--you should be able to use it to set the contents of
variables in a list. How the compiler and interpreter work aren't part
of the specification, and besides, where the specification let's me
down, it needs to be amended. Presumably, the interpreter could check
to see if the contents were a list or a variable, and act accordingly.
This might slow down interpretation for the common case, but I'm not a
compiler and interpreter writer, so there may be optimizations
available. At any rate, I think other languages handle similar cases
the way I think it should work, so I've a hard time believing that it's
not technically feasible.
Mike
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.