067 Swift

09 Apr 2016

Swift is a new programming language developed by Apple. In this episode, we will go through some of the basic language attributes such as var, let, control flow, optionals, closures and class.

Download video: mp4

Sample code: Github

Version: 2.2

Background on Swift

  1. Learn one new programming language per year

Things to learn with Swift

Basics

  1. Download the latest xCode
    • Check the version in your command line: swift --version
    • Check the common commands: swift --help
    • Check where the executable is hosted: which swift
    • Create a file called 1-print.swift with the code

swift print("hello world") - Run it in the command line with swift {FILENAME} E.g. swift 1-print.swift - Try out the code and run them in the command line

Try it online

Learn iOS with Swift