BTI Beyond The Interviews

Languages · 17 sections

Swift

Optionals, value types, ARC, structured concurrency and modern Swift 6 — the iOS/macOS interview essentials.

Premium · preview 138 cards Updated 24 Oct 2026
Free to preview. The first 3 cards and the full outline are below — the rest of this sheet is part of the Languages bundle.

What's inside

Preview — first 3 of 138 cards

Type inference

Swift infers a variable's type from its initializer. Annotate explicitly when there's no initializer or to force a wider/narrower type.

let x = 42            // Int
let y: Double = 42     // Double
var name = "Ada"       // String

let vs var

let creates an immutable binding; var a mutable one. For value types, let also makes the value immutable. Prefer let by default.

let pi = 3.14
// pi = 3  // error
var count = 0
count += 1

Primitive types

Int (platform-sized, 64-bit on modern), Double, Float, Bool, String, Character, UInt. Int is the default integer literal type. Use Int (not UInt) for general arithmetic to avoid conversion friction.

let i: Int = 1
let d: Double = 1.0
let b: Bool = true
let c: Character = "A"

135 more cards in this sheet

Unlock the Languages bundle — ₹399

One-time payment. Unlocks this sheet and 7 other sheets in the bundle, plus a typeset PDF of each.

Unlock the bundle See all bundles

Or get all 76 sheets for ₹999 — one payment, every future sheet included.