The Dave Scripting Challenge

Jeff Bone jbone@jump.net
Sun, 26 Aug 2001 16:25:28 -0500


Dave Winer wrote:

> With all due respect, you totally missed the point of AppleScript.
>
> Look at the object model for controlling external apps.

I think I got your point --- I just don't think the mapping to REST is as
direct as you think it is.  I think this is fundamental to the differences
we're talking about, so let's press on...

Sanity-check me here:  the Applescript object model exposes application objects
inside applications and their documents to scripting via dictionaries.  These
dictionaries define the classes of the objects exported, their properties and
the commands which operate on them.  Each application has its own object model
(set of nouns) and command set (set of verbs) though there is significant
consistency between apps with respect to the latter.  All objects live in a
hierarchical relationship;  "[e]verything belongs to, is related to, is
contained in, or is part of something else."  The coordination paradigm is to
have scripts navigate this "chain of command" ultimately invoking operations on
some object of interest.

Similarities:  I'll admit that the "chain of command" container / part /
relation hierarchy has some absolutely striking similarity (it's identical!) to
the kind of resource modeling paradigm I've described elsewhere.

Differences:  even though there is a significant amount of consistency in a
basic set of commands most applications support, it differs in that it's a
larger set of verbs, not all applicaitons support all (or any) of them
particularly, and each application can actually define its own syntax for a
given command.  Not only are command implementations free to decide their own
arity and signature, they're even able to *change the syntax of the language*
on a local scale.

That's a HUGE difference.  I'm not saying it's bad or wrong or ugly, but it's a
fundamentally different approach to coordination and reuse than a system
providing a consistent compositional algebra for wiring together objects with
identical generic interfaces.

You do get what I'm saying, don't you Dave?  I'll keep poking around in
Applescript some looking for more Zen.  :-)  I've no doubt there are even more
interesting things lurking around in there...

jb