Re: Admin: a suggestion on the script corruption problem.
Re: Admin: a suggestion on the script corruption problem.
- Subject: Re: Admin: a suggestion on the script corruption problem.
- From: Chris Nebel <email@hidden>
- Date: Sun, 18 Feb 2001 12:25:12 -0800
- Organization: Apple Computer, Inc.
Arthur J Knapp wrote:
>
> Date: Fri, 16 Feb 2001 13:41:46 -0800
>
> From: Christopher Nebel <email@hidden>
>
> Subject: Re: Admin: a suggestion on the script corruption problem.
>
>
> I filed an enhancement request a month or two back for 7-bit clean
>
> AppleScript, i.e., nothing but pure ASCII.
>
>
Chris, you have really made my day. :)
>
>
> There are only two places where AppleScript requires the use of
>
> Mac-specific characters: the raw code brackets and continuation
>
> characters. There are several others where AppleScript prefers to use
>
> Mac characters, but has a pure ASCII equivalent: not-equal, greater- (or
>
> less-) than-or-equal-to.
>
>
Well, equivalents that are more or less useless, since the darn compiler
>
forces them to be replaced by their high-bit synonym.
Well, that depends on what you need to do. I forgot to mention this
initially, but part of my scheme is to introduce an extra preference that
says, in essence, "decompile using straight ASCII." (I have yet to figure
out some way to express this that won't completely befuddle novices.)
If you're just copying scripts from the list, it wouldn't matter which way
you have the switch set, because the compiler will understand both the ASCII
and non-ASCII versions all the time. If you want to post scripts, though,
you'd turn the switch on, and your scripts would show up using only ASCII
characters. (Well, for language elements, at least. Inside strings and
comments, you're on your own.) This won't completely eliminate the list
problem, since the switch will probably default to off, and newbies probably
wouldn't know to turn it on, but it at least provides a quick and easy
solution.
My point above was that there are only two places where I'd have to introduce
entirely new tokens for existing things, because the others already have
plain ASCII versions, even if the decompiler always munges them. This is
good, because altering the syntax of a language can be, shall we say,
disruptive, so you want to keep changes as small as possible.
--Chris Nebel
AppleScript Engineering