The Swift interpreter is a great way of learning how to program in Swift. It allows expressions, statements, and functions to be created and tested along with a command-line history that provides editing support. The basic collection types of arrays and collections, the standard data types, such as strings and numbers, optional values, and structures, were presented. Control flow and functions with positional, named, and variadic arguments, along with default values were also presented. Finally, the ability to write Swift scripts and run them from the command line was also demonstrated.
The next chapter will look at the other way of working with Swift code that is available on OS X, through the Xcode playground.