Apple has created an iPad-based Swift Playgrounds app that incorporates puzzles, games and other fun tasks all designed to encourage children and teens to learn to code using the Swift programming language.
The idea is to help create an interest in software coding in young people so Apple can find the next generation of software developers with the skills to develop apps for its iPhones, iPads, Macs, Apple Watches and other devices.
Swift Playgrounds, which is expected to be available for free use in the fall following a public beta in July, was unveiled June 13, the opening day of Apple’s Worldwide Developers Conference (WWDC 2016) in San Francisco. Designed for use by anyone, Swift Playgrounds uses an interactive interface to bring coding to life by helping users guide onscreen characters through an immersive graphical world where they solve puzzles and master myriad coding challenges.
Built into Swift Playgrounds are templates that are designed to encourage users to express their creativity and create programs that can be shared with friends in Web postings or using Apple's Mail or Messages apps.
The original Swift programming language was introduced in 2014, combining the performance and efficiency of compiled languages with the simplicity and interactivity of popular scripting languages. Swift 2.0 was later introduced at the Apple Worldwide Developer Conference in June 2015 as an updated version of the language. Swift builds on the best of C and Objective-C, without the constraints of C compatibility, according to Apple. The language adopts safe programming patterns with modern features to make programming easier and more flexible, Apple said.
The updated Swift 2.0 version provided improved performance with a new error-handling API and improved support for availability-checking.
Now Apple wants to share Swift development with students of all ages so they can learn core coding concepts—including issuing commands, creating functions, performing loops and using conditional code and variables—while building their coding confidence and skills, according to Apple.
Swift Playgrounds also will be updated regularly with new challenges so students can grow their lessons, and teachers and developers will be able to create their own challenges for students using the Xcode development environment.
"I wish Swift Playgrounds was around when I was first learning to code," Craig Federighi, the senior vice president of software engineering at Apple, said in a statement. "Swift Playgrounds is the only app of its kind that is both easy enough for students and beginners, yet powerful enough to write real code. It's an innovative way to bring real coding concepts to life and empower the next generation with the skills they need to express their creativity."
Swift Playgrounds was designed to enable students to create programs using iPads in only a few taps, according to Apple. It also offers a coding keyboard that adds characters common to Swift programming, giving students the tools they need to create their code by swiping across the key or using a shortcut bar that presents the most likely next commands or values based on context. Also available is a popover keypad that lets users tap to edit a number in place, touch a color value to display a color picker or drag the boundaries of a loop or function definition to wrap around existing code.
The App Camp for Girls, a weeklong summer coding camp for teen girls held in various cities, plans to adopt the upcoming code development environment for its participants, said Jean MacDonald, the founder of the group, in a statement. "The new Swift Playgrounds app from Apple is one of the most powerful, yet approachable, educational coding apps we've ever seen, and we can't wait to incorporate it into our upcoming camp curriculum. It's a fun and intuitive way for our students to learn the basic principles of coding using the iPad, and also become skilled in Swift, a language that can grow with them in whatever they choose to do."
In February, Apple open-sourced its Swift Benchmarking Suite just two months after making the Swift programming language itself open source in December, eWEEK reported. The benchmarking suite includes source code for benchmarks, libraries and utilities that are designed to help track Swift performance and catch performance regressions before they are committed.