LearningSwiftLite

=Reference=
 * Swift Programming Language click

=Language=

Types of Variables

 * Declare constants with the let keyword
 * Declare variables with the var keyword

Optionals
invitees?.removeAll
 * Optional chaining

var name: String!
 * Implicitly unwrapped optionals

Type Annotations
A variable called welcomeMessage, to indicate that the variable can store String values.

As

 * as!
 * as?

Conditionals
Tbd

Switches
Tbd

Loops
Tbd

Function

 * Reference to click

Closures
func double(input: Int) -> Int { return input * 2 }   var doubleClosure1 = double print(doubleClosure1(2)) // 4

var doubleClosure2 = { (input: Int) -> Int in       return input * 2 }   print(doubleClosure2(2)) // 4

Initialiser

 * override
 * required
 * convenience
 * designated

Properties

 * Computed properties

Extension
An extension can extend an existing type to make it adopt one or more protocols. Where this is the case, the protocol names are written in exactly the same way as for a class or structure
 * Extension Syntax click

=Usage=

Code Design

 * Api design guidelines - swift.org click

Creating a Package
swift package init

swift package init --type executable # swift package init --type library

String Format

 * String formatting with NSString/String
 * FormatSpecifiers from Apple click
 * FormatSpecifiers from Apple click
 * FormatSpecifiers from Apple click

Substring
=Appendix= Tbd