Benad's Web Site

My first programming experiences were with HyperTalk, the scripting language of HyperCard. If you're not familiar with HyperCard, it was a program made for the Macintosh in the end of the 80's that was a kind of precursor Macromedia Flash, HTML and FileMaker, all in one easy-to-program format. The HyperTalk scripts could be attached to buttons or any other elements of an HyperCard "stack". "Scoping" for shared functions could be done by attaching the scripts to a particular "background" of a series of "cards", or to the whole "stack" itself. A kind of object-oriented design could be done by placing values in hidden text fields.

A special note should be given to the language itself. It was a bit similar to Pascal, the programming language of choice for the Macintosh, and made a strange distinction between functions and procedures. But more importantly, it's syntax was so simple, even compared to Basic, that for most non-programmers it looked like a simple form of English.

I mainly used HyperCard and HyperTalk for some highly interactive teaching tools for Chemistry and French grammar, at a time when "multimedia" was all the buzz.

My second programming language (more a scripting language too) was AppleScript. To explain what is AppleScript, let me put it in context. For the Macintosh System 7, Apple introduced a new technology called Apple events. In the typical application GUI event loop, Apple events are special events that can be sent between processes, making it possible for the first time on the Macintosh to have some kind of inter-process communication. Those Apple events can describe function calls, with arguments and some basic types and data structures (strings, lists, etc.), and also get and set operations of object attributes identified by ID and type. By generating Apple events to yourself for every GUI events, it became possible for another application to record and replay GUI actions.

An application could additionally provide a dictionary that provides a name and textual description of externally available Apple events functions and objects, making it possible to present them in a scripting language of some kind. Of course, that language is AppleScript.

AppleScript was heavily influenced in style by HyperTalk, though it has more functionality. Since it internally compiles the script into some bytecode format, it had the unique ability to present itself not only in its original scripting form, but also in different human languages (French, Spanish, German, etc.) Now that feature doesn't exist anymore and only the English form remains, but at the time it was quite fun for me to use a programming language in French, my mother tongue.

At the time I used it mostly to automate complex file system operations and to scripts operations in a web browser, a feature I haven't found an equivalent for until I discovered Selenium IDE for Firefox.

Today, with its tight integration with Objective C, AppleScript is still in use in Mac OS X.

Published on August 6, 2009 at 15:55 EDT

Older post: A Programmer's Journey

Newer post: APJ 2: C (my experience learning the C programming language)