[Pythonmac-SIG] appscript terminology caching

Jack Jansen Jack.Jansen at cwi.nl
Sat Oct 16 22:48:35 CEST 2004


On 16 Oct 2004, at 15:39, has wrote:
>> And while we can't in the general case, because there's no "compile 
>> step" for Python, it would be good to have it at least for py2app 
>> packaged programs.
>
> I assume you're not referring to AS's hideous habit of baking AE codes 
> right into the bytecode, but a rather less toxic solution of merely 
> attaching a bunch of runtime translation tables to a script, yes?

I was indeed thinking of the latter, really pretty similar to what the 
gensuitemodule stuff did but a bit less "manual".

But now that we're on the subject, and given that you're the resident 
AS/OSA expert: could you explain what is so bad about baking the AE 
codes into the bytecode? Because to me it seems perfectly sensible: as 
the AE codes are the "real" language you insulate your program from 
whatever changes happen to the human-readable version of the language 
afterwards. Up to and including Apple's (luckily long abolished) 
translation of AppleScript into French.

Moreover, I think that binary/ascii doesn't really make much of a 
difference here. XML documents need an exact DTD URI to remain valid, 
so they might as well be binary for that matter.

Of course, if some misguided vendor subsequently changes the 
interpretation of the AE codes in an incompatible way you're hosed. But 
the same is true for AppleScript-the-language: I remember that 
MetroWerks at one point completely redesigned their suites and re-used 
some of the old verbs in completely incompatible ways...
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman



More information about the Pythonmac-SIG mailing list