Re: AppleScript4programmers
Re: AppleScript4programmers
- Subject: Re: AppleScript4programmers
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 5 Dec 2007 23:50:23 -0500
COBOL worked very well, actually. So well that programs written in it
were still in use when Y2K rolled around...
AppleScript is, absolutely, different from many other programming
languages. If your background is in C-like langs, which is pretty
much all of the major ones these days, AS is a big jump. Perhaps not
quite as big as the jump from, say, FORTRAN to LISP. It's not a
paradigm shift, like from declarative to procedural, or procedural to
object-oriented; semantically, you do pretty much the same things.
But syntactically it looks different, and no matter how many CS
professors tell you that syntax doesn't matter, it really does.
Syntactic sugar has *some* nutritional value.
As has been noted, a lot of the oddness comes from the flexibility,
which sometimes leads to inconsistency: two applications may choose to
implement the same feature in completely different ways, and you can't
always find what you're looking for given just the dictionary. I
think the biggest hurdle for new AS programmers is just discovering
what the vocabulary is for any given task.
Perhaps what is needed is better tooling - something like the
Smalltalk browser, to let you visually explore the classes and
commands and live objects in an application. Similar to the tools
that help you figure out the control hierarchy for GUI scripting, but
for regular old scripting-scripting.
Of course, there are better tools than Script Editor available for
AppleScript, but they don't come with the system (Smile) and some cost
$$ (Script Debugger). I'm not saying they're not worth the time
and/or money to get, but there's a barrier to entry.
One of the most valuable pedagogical tools, IMO, is an interactive
shell - I think that's what made it easy for the geeks of my
generation to get proficient at microcomputer BASIC. But the default
AS install has no such animal. (You can type scripts and run them,
but each run starts over from the start, rather than picking up where
you left off.) Something like phpa, python, irb, or tclsh. Perl
doesn't come with one of those, either, unless you count perlsh, which
I don't... but the point is, there needs to be a way to play with the
language in a more interactive way than "run this script and see what
happens", "run that script and see what happens". All, again, IMO.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden