Book Image

Swift Cookbook

Book Image

Swift Cookbook

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


If you've ever programmed with an interpreted language such as Python, Perl, Ruby, or JavaScript, you probably noticed an advantage to these languages, over native languages such as C, Objective-C, or C++, which is the possibility of testing code without the need to add extra code to your project.

Sometimes, a developer needs to test a code before adding it to the project, mainly when you are learning the way Swift works. However, even if you are very experienced with Swift, there will be times when you will have new ideas, and you'll probably need to check whether this is a valid idea before coding it into your project.

For situations like these, Apple released the playground, a place where you can play with your code, test it, visualize it, and of course, decide on the usability of the code before adding it to your application.

It's quite impressive that Swift is a compiled language, but you can use playground to test your code as you go, similar to if you were on an interpreted...