HyperTalk
HyperTalk is a high-level programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. The main target audience of HyperTalk were beginning programmers, hence HyperTalk programmers were usually called authors, and the process of writing programs was called "scripting". HyperTalk scripts are fairly similar to written English, and use a logic structure similar to the Pascal programming language.The case-insensitive language was at first interpreted, since HyperCard 2.x 'virtually compiled'. It supports the basic control structures of procedural languages: repeat for/while/until, if/then/else, as well as function and message "handler" calls (a handler is a subroutine, a message handler is a procedure). Data types are transparent to the user, conversion happens transparently in the background between strings and numbers. There are no classeses or data structures in the traditional sense, their place was taken by special stringss, or rather "lists" of "items" delimited by a certain character (in later versions the "itemDelimiter" property allowed choosing an arbitrary character).
| Table of contents |
|
2 Extending HyperTalk 3 Descendants of HyperTalk 4 Some sample scripts |
However, HyperTalk was by no means a strictly procedural language. Scripts were associated with objects in HyperCard files (so-called "stacks"), and HyperTalk allowed manipulating these objects in various ways, changing their properties using the "set" command, for example. HyperTalk also provided full-blown script control over the built-in drawing tools, simply by scripting the needed changes in paint tools and simulating mouse movements using the "drag from
HyperTalk also used "messages" (i.e. events) sent to objects to handle user interaction. E.g. the "mouseDown" message was sent to a button when the user clicked it, and "mouseUp" was sent when the user released the mouse inside it to trigger its action. Similarly, it had the periodic "idle" message, "mouseEnter", "mouseLeave", ... and various other messages related to navigation between different "cards" in a HyperCard stack, user input (keyDown, functionKey, ...), system events. As far as the scripters were concerned, there were no main event loops or anything of that kind.
Although the HyperTalk language languished just like HyperCard itself, it received a second lease on life through its plugin protocol, so-called External Commands (XCMDs) and External Functions (XFCNs), which were native code containers attached to stacks (as Macintosh-specific resources) with a single entry point and return value. XCMDs and XFCNs could be called just like regular message and function handlers from HyperTalk scripts, and were also able to send messages back to the HyperCard application. Some enterprising XCMD authors added advanced features like full color support (ColorizeHC, HyperTint, AddColor), multiple special-purpose windows (Prompt, Tabloid, Textoid, Listoid, ShowDialog, MegaWindows), drag and drop support and various hardware interfaces to the language.
These clones and dialects (commonly referred to under the moniker of "xTalk"-languages) added various features to the language that are expected from a modern programming language, like exception handling, user-defined object properties, timers, multi-threading and even user-defined objects.Object-Oriented HyperTalk
Extending HyperTalk
Descendants of HyperTalk
Various languages have taken their cues from HyperTalk. There are straight clones like
As well as second-level clones like
Although Asymmetrix Toolbook is often also considered a HyperCard clone, its scripting language (as far as I have been able to determine by looking at Toolbook Instructor) bears hardly any resemblance to HyperTalk.