Lazy Var vs Let
问题 I want to use Lazy initialization for some of my properties in Swift. My current code looks like this: lazy var fontSize : CGFloat = { if (someCase) { return CGFloat(30) } else { return CGFloat(17) } }() The thing is that once the fontSize is set it will NEVER change. So I wanted to do something like this: lazy let fontSize : CGFloat = { if (someCase) { return CGFloat(30) } else { return CGFloat(17) } }() Which is impossible. Only this works: let fontSize : CGFloat = { if (someCase) { return