Deciding between ‘let’ and ‘var’ for Swift struct properties
A Swift tutorial explains how choosing let or var for struct properties affects more than mutability. Declaring an optional property with let, for example, means a value must always be passed for it in the compiler-generated memberwise initializer, even when that value is nil. The guide uses a User struct to illustrate how each choice shapes the struct's behaviour.
AI-written summary, checked against the cited sources. How summaries work