related topics
{math, number, function}
{system, computer, user}
{language, word, form}
{son, year, death}
{day, year, event}
{@card@, make, design}

HyperTalk is a high-level, procedural 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 was 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 interpreted at first, but became 'virtually compiled' since HyperCard 2.x. 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 classes or data structures in the traditional sense; their place was taken by special string literals, or rather "lists" of "items" delimited by commas (in later versions the "itemDelimiter" property allowed choosing an arbitrary character).


Object-Oriented HyperTalk

HyperTalk was not 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. Objects were addressed using a syntax close to natural language, where objects were specified relative to the current card, or the of operator was used to specify the absolute position of an object: send "mouseUp" to card button "OK" of card "Veracity". Since buttons and fields could also exist on the background layer, but their content would differ between cards, there were card fields, background fields etc. Objects could be addressed by their name, z-ordering number, or by a unique ID number that usually did not change throughout an object's lifetime. To iterate over objects (joinedly referred to as parts in HyperCard 2.2 and later), one simply used their number after querying e.g. the number of card parts.

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 start to end and the click at position commands.

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, as well as user input (keyDown, functionKey, ...), and system events. As far as the scripters were concerned, there were no main event loops like in other procedural programming languages.

Full article ▸

related documents
P-code machine
Compiler optimization
Key (cryptography)
Unified Modeling Language
Universal Turing machine
Pike (programming language)
ANSI escape code
Genetic programming
Spaghetti code
Basic Encoding Rules
Ada (programming language)
Maple (software)
Event-driven programming
Queueing theory
Object-relational database
Robots exclusion standard
Universal Product Code
Esoteric programming language
ElGamal encryption
Reserved word
SECD machine
Binary space partitioning
Gaussian integer