Swift provides signed and unsigned integers in 8
, 16
, 32
, and 64
bit forms
let maxInt = UInt8.max
let minInt = UInt8.max
Float
64 bit, Double
32 bit
Booleans or bool
can be either true
or false
let http404 = (404, "Not Found")
Named tuples are similar to Python dictionaries
let http200Status = (statusCode: 200, description: "OK")
print("The status code is \(http200Status.statusCode)")