HyperTalk

From ArticleWorld


HyperTalk is high-level programming language used with Apple's HyperCard hypermedia software. HyperTalk is generally aimed at people who are making their first steps in computer programming, featuring a simple, English-sounding syntax and a Pascal-like structure.

Features

HyperTalk features the basic structures of any full-blown programming languages, including decision structures, repeating structures and function and message handler calls. The language is type-safe, and data types are user-transparent, with conversions quietly occurring in the background. Standard HyperTalk does not feature classes or data structures, but later extensions featured these as well.

The language could be extended through a plug-in protocol, allowing the definition of External Commands (XCMDs) and External Functions (XFCNs). These were native code containers, but associated to stacks with single entry-point and return-value, thus allowing communication with external applications through simple messages. This allowed support for full color and drag&drop to be added to HyperCard scripts.

Object-oriented HyperTalk

Although the language itself was mostly a procedural one, object-oriented features were present. The scripts were associated with HyperCard files and the objects contained by them, therefore allowing the objects contained in the HyperCard files to be manipulated. Their usage was very intuitive, through the of keyword. For example, sending a message to a button was as simple as:

send "mouseEnter" to card button "Exit" of card "Dialog"

Objects in HyperCard files could be addressed by name, z-ordering or by a unique ID number, allowing iterations over all the objects. The above example also demonstrates the ability to send messages to objects. For the user, there was no main event loop to deal with.

Descendants

HyperTalk was a major influence in scripting on the Mac platform, generating many descendants. The more notable ones are:

  • SuperTalk, the language of SuperCard developed by Bill Appleton. SuperCard was the first HyperCard clone.
  • MediaTalk, for Oracle Media Objects, which was cross-platform and completely modular
  • CompileIt!-Talk, which was a HyperCard and XCMS stack that compiled to 68k-native code, as opposed to the traditional method (HyperTalk was initially interpreted and, alter, bytecode-compiled)