AppleScript insight
Posted: Fri Nov 15, 2019 9:34 am
https://pdos.csail.mit.edu/6.828/2007/r ... script.pdf
“The experiment in designing a language that resembled
natural languages (English and Japanese) was not success-
ful. It was assumed that scripts should be presented in “nat-
ural language” so that average people could read and write
them. This lead to the invention of multi-token keywords
and the ability to disambiguate tokens without spaces for
Japanese Kanji. In the end the syntactic variations and flex-
ibility did more to confuse programmers than to help them
out. It is not clear whether it is easier for novice users to
work with a scripting language that resembles natural lan-
guage, with all its special cases and idiosyncrasies. The main
problem is that AppleScript only appears to be a natural
language: in fact, it is an artificial language, like any other
programming language. Recording was successful, but even
small changes to the script may introduce subtle syntactic er-
rors that baffle users. It is easy to read AppleScript, but quite
hard to write it.
When writing programs or scripts, users prefer a more
conventional programming language structure. Later ver-
sions of AppleScript dropped support for dialects. In hind-
sight, we believe that AppleScript should have adopted the
Professional Dialect that was developed but never shipped.
Finally, readability was no substitute for an effective se-
curity mechanism. Most people just run scripts—they don’t
read or write them.”
“The experiment in designing a language that resembled
natural languages (English and Japanese) was not success-
ful. It was assumed that scripts should be presented in “nat-
ural language” so that average people could read and write
them. This lead to the invention of multi-token keywords
and the ability to disambiguate tokens without spaces for
Japanese Kanji. In the end the syntactic variations and flex-
ibility did more to confuse programmers than to help them
out. It is not clear whether it is easier for novice users to
work with a scripting language that resembles natural lan-
guage, with all its special cases and idiosyncrasies. The main
problem is that AppleScript only appears to be a natural
language: in fact, it is an artificial language, like any other
programming language. Recording was successful, but even
small changes to the script may introduce subtle syntactic er-
rors that baffle users. It is easy to read AppleScript, but quite
hard to write it.
When writing programs or scripts, users prefer a more
conventional programming language structure. Later ver-
sions of AppleScript dropped support for dialects. In hind-
sight, we believe that AppleScript should have adopted the
Professional Dialect that was developed but never shipped.
Finally, readability was no substitute for an effective se-
curity mechanism. Most people just run scripts—they don’t
read or write them.”