The Swift Playgrounds app is Apple's implementation of the idea that everyone can—and should—learn to code.
Announced today at WWDC in San Francisco, the free iPad app will be available this fall and is based on the open-source Swift programming language. Apple calls writing Swift code "interactive and fun," so it's easy to see why Cupertino thought it would be a natural platform to teach budding young coders.
The key words are "budding" and "young:" Swift Playgrounds is geared towards schoolkids in pretty much every way possible, from its name to its avatars that take its users on fanciful coding journeys. That's not to say adults won't find it informative, but as Apple CEO Tim Cook put it, "we believe coding should be a required language in all schools. We hope that this gift to kids and schools around the world will help make coding part of a school day."
The app is built around lessons; kids will learn how to issue commands, create functions, perform loops, and use variables. They're guided by onscreen characters who serve up puzzles and challenges to master.
For example, the very first lesson asks the programmer to help an alien-like cartoon character collect a shiny gemstone by using simple commands. The suggested commands—like "run," "jump," and "get gem"—show up at the bottom of the display window, mimicking the style of predictive texts in Messages in iOS. Tap a few of them, and your alien is soon walking forward to collect his prize.
More advanced users can create empty playground documents or start from one of the built-in templates to build an entire app.
Swift itself is open-source and very popular—it's frequently downloaded on Github and powers several App Store chart-topping apps like Lyft. The Playgrounds app, though, is a controlled, enjoyable environment, perfect for drawing the next generation of coders ever closer to the Apple ecosystem.
Also today at WWDC, Apple showed off watchOS 3, iOS 10, and MacOS Sierra.