Part II: The AppleScript Language
|
Chapter 4. Introducing the Language
Part I of this book describes AppleScript as a
technology
why and where and how you use it (Chapter 1 and Chapter 2), the Apple events that lie behind it, the AppleScript scripting component that implements it, the kinds of file it creates and some of the details of working with those files, and the means and modes whereby applications make
This chapter serves as a starting point for your journey through the AppleScript language. The longest journey, it is said, begins with a single step. But even before that, sometimes it's a good idea to contemplate the road. That's what this chapter does. It describes the nature of the AppleScript language in very general terms. What
The AppleScript language
I've never created a computer language, but I suspect it must be a special sort of labor, both
(If you haven't read Appendix A, I would urge you to take a moment to do so right now. It displays, by actual example, what it's like to work with AppleScript, and shows why it's important to have a solid
|
4.1. A Little Language
The "little language" philosophy, as represented by such computer languages as LOGO, Smalltalk, and Scheme, comes in various forms but the very words "little language" tell you most of what you need to know. Littleness can be a virtue in a number of ways. A little computer language can fit in a small space and be run by a small interpreter. A little computer language can be easy to learn, just because there's less of it to learn. A computer language is a tool to make tools, so the initial tool itself can be quite minimal, provided it has the power to make any other tools that may
All of these notions apply to AppleScript. AppleScript was to be easy for users to learn, so the less there was of it, the better. AppleScript appeared at a time when the idea of a computer with as much as four megabytes of random-access memory still felt rather
And the purpose of AppleScript, after all, was to tell
other
programs to do things. Thus AppleScript itself could afford to be so minimal as to have little or no power of its own. AppleScript has minimal string-munging and number-
So
is
AppleScript's littleness a virtue? Probably notat least, not any more. Thanks to Moore's Law and the passage of time, we no longer need AppleScript to be so tiny. Its small
|