The unlikely persistence of AppleScript

By John Gruber, Macworld |  Software, AppleScript

The idea was that eventually there might be a more traditional OSA scripting language (something that looked, syntactically, more like a language like C or Pascal) for advanced users. That dream never really took hold. There were a few obscure exceptions (developer Mark Alldritt created a version of JavaScript that worked as an OSA scripting language, for example), but AppleScript was the only OSA language that ever had support from Apple or traction among users.

A foreign language

What makes it so surprising that AppleScript survived and remains a fully-supported-by-Apple technology today (including in OS X Mountain Lion) is that it was never loved by anyone. It was a fine theory and noble experiment, but it turns out that an English-like programming language didnt really enable a large number of users to become programmers. And conversely, AppleScripts English-like syntax often made (and to this day continues to make) things more difficult and confusing for scripters, not less.

Put simply, the number of programmers in the world who consider AppleScript their favorite language could fit in a very small car, or perhaps even share a bicycle. But, as noted, AppleScript was the only OSA scripting language that ever gained any traction.

Making the odds even longer, OSA-scriptability required low-level architectural support from application developers. Developers couldnt just flip a switch in the compiler to make their apps scriptable by AppleScript; they needed to add scripting support manually, through very hard work. And Cocoa, the application framework from NeXT, was not originally designed with AppleScript in mind.

Still alive and well

To recap: Decidedly old-school-Apple/pre-NeXT technology. A programming language syntax that frustrated experts and failed to achieve its intended goal of empowering non-programmers to program. A technical mismatch with the Cocoa application framework. You need this historical context to understand how unlikely AppleScripts long-term success was. Someone with access to a time machine could make a lot of money by going back to Apple's Worldwide Developers Conference 1998 and accepting wagers that AppleScript would be alive and well in the year 2012.

But alive and well it is.

Ive had, from the outset, a more decidedly bifurcated love/hate relationship with AppleScript than with any Apple technology ever. I despise the syntax of the languageits ambiguity, its propensity for hard-to-spot terminology conflicts between different scopes, its general verbosity. But I love what AppleScript enables me to do. The automation of oft-repeated tasks. Creating my own small little features within my most-used and most-depended-upon apps.

Originally published on Macworld |  Click here to read the original story.
Join us:






Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Ask a Question