The Xcode cliff
Swift Playgrounds is a wonderful introduction to programming. It introduces imperative logic, functions, methods, loops, and many of the marvelous APIs that are available to iOS developers.
But it’s called a “playground” for a reason: you can’t make an app with Swift Playgrounds. You play with code, you learn
about code, and you do indeed code. But if you want to build something useful and distributable, you need to look elsewhere.
Some popular options are Codea, which allows you to build full apps in Lua on your iPad; Pythonista, which offers a Python IDE and a number of popular libraries to work with; and of course there’s always the cloud.
But inside the Apple ecosystem, this “elsewhere” is called Xcode. It’s a huge and complicated application that runs only on Macs, and requires an Apple Developer account to effectively distribute the software you build.
I probably wouldn’t recommend a kid learn Swift as their first programming language, not because it’s not a great and interesting language, but because the barrier to distribution and the creation of useful software is so high. The Xcode cliff is a steep one.
For instance, here’s what writing for ARKit in Swift Playgrounds looks like. Mostly you’re dealing with a few pre-written one-liners and a highly ergonomic API: