Absence & nothing

Optional values

A ? on a type means “this, or nothing.” String? is shorthand for Optional<String> — a value that’s either a real string or None.

Here’s the part that trips up Rust and Swift folks: a present optional carries no wrapper. There’s no Some("Ada") — the value is just "Ada". Present is the bare value; absent is None.

Same slot, same String? type, both states — it started as None, then held a plain "Ada", with no boxing to assign and nothing to unwrap.

One wrinkle: a lone None has nothing to infer a type from, so fix x = None; needs an annotation like fix x: String? = None;. Actually pulling the string back out — using the two cases — is the next screen.