O'Reilly logo

Learn Swift 2 on the Mac, Second Edition by Waqar Malik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    2

The Swift Playground in Xcode

The Swift playground is a new environment where the developers can view and manipulate their code live, instead of having to compile and run and test their code. You type your code and the compiler evaluates the code and gives you feedback right away; you can see the side effects. Think of it as a mini project with one file and an SDK to compile against.

Note  Other languages such as Scheme or Lisp have what is called REPL (read-eval-print-loop), which serves the same purpose.

This chapter will walk you through creating a playground and interacting with it. You will also create your first basic programs in Swift. We will be using playgrounds throughout this book whenever we need to demonstrate some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required