Tech —

Apple’s Swift Playgrounds can help you learn to code, but it’s no HyperCard

The programming sandbox, seen through the eyes of devs, slightly misses the mark.

Apple’s Swift Playgrounds can help you learn to code, but it’s no HyperCard
Apple

For all Apple’s obsessive secrecy, even its senior managers acknowledge with an on-stage wink that much of what they announce these days has already been predicted. In the run-up to WWDC, I saw developers on Twitter wishlisting "Xcode for iPad"—a way to write apps on an iOS device rather than in the Xcode integrated development environment (IDE) that Apple makes available exclusively for the Mac. One suggestion was that this could be an iOS version of Playgrounds, the interactive test builder that Apple added to Xcode when launching its new programming language, Swift, in 2014.

Sure enough, 45 minutes into the 2016 WWDC keynote, Tim Cook—not an SVP, but Tim himself!—unveiled Swift Playgrounds for iPad, "a new way to learn to code." Because I’d been thinking about it, I had my tweet ready: "I personally think a way to learn Swift is not what the iPad needs—it needs a 21st Century HyperCard. But let’s see."

Later, John Gruber (whose Daring Fireball blog is to Apple what BBC Radio 4’s Today show is to British politics) provided a glimmer of hope: "Swift Playgrounds = the new HyperCard?"

Well, no, it turns out. It’s not.

HyperCard's legacy

What’s HyperCard? Back in the '90s, it was how you got stuff done on a Mac when there wasn’t already an application to use. There still isn’t a word to describe it except "HyperCard." Arguably, HyperCard was mostly a database with a form designer, a stateless data repository, and scripting. Rather than standalone sequences of commands that you could run on the system like macros, HyperTalk scripts were code snippets attached to objects and triggered by events. It was a very modern approach and, just as significantly, it didn’t feel like code.

Some people will tell you HyperCard’s HyperTalk was object-oriented; others call it procedural. To this layperson, it seems like an imperative language operating on an object-oriented system. What it looked like to the user wasn’t much more daunting than stilted English. All kinds of Mac owners—administrators, scientific researchers, teachers, game developers, writers, artists—found they could quickly learn to speak it.

HyperCard "stacks" became a popular medium for creating and sharing homemade software; for some a rapid application development (RAD) tool, for others a visual authoring environment. Myst, the breakthrough graphical adventure game, originated as a HyperCard stack. Stewart Brand’s Whole Earth Catalog—a major influence on '80s tech thinkers, including Steve Jobs—was converted into a 9,472-page HyperCard stack. Some of the first and best interactive CD-ROMs (remember the age of interactive CD-ROMs?) were HyperCard stacks.

The point is not that HyperCard itself was so successful, but that HyperCard was was so enabling. HyperCard succeeded precisely because it didn’t try to teach anyone to be a programmer, and instead it put the raw capability of the computer in the hands of people who didn’t have time to become programmers.

As befits such a leap of imagination, Apple’s Bill Atkinson, who created HyperCard, credits his invention to an LSD trip. Already celebrated as the author of MacPaint, he knew HyperCard was bigger. "It's going to open up people because there are so many things you can do with it," he told an interviewer in 1987.  As a truly personal computer "for the rest of us," the Macintosh had "succeeded to some extent by using graphics and menus, and a consistent user interface and direct-manipulation metaphors," but its complexity, compared to earlier command-line systems, made it harder to program. Atkinson admitted even ambitious users were limited to the capabilities of commercially available applications, "they could only use canned pieces of power."

Bill Atkinson in a department store.
Enlarge / Bill Atkinson in a department store.

HyperCard, "like a software erector set," would crystallise computing into building blocks that any user could snap together to implement the functionality and user interface they had in mind. That’s not what Swift Playgrounds does today, however. Apple's newest attempt to democratize coding presents a very inviting experience to the budding developer, but it insists that you code. And even after having done so, you still don’t get a deliverable app—only a work in progress.

Swift Playgrounds is definitively not HyperCard, but could it have been? Does it matter?

Channel Ars Technica